การติดตั้งใช้งาน AOSP ใช้ API การเรียกกลับภายในใหม่ระหว่าง UI ของระบบกับ เซิร์ฟเวอร์ของระบบ API นี้ช่วยให้เซิร์ฟเวอร์ระบบแจ้ง UI ของระบบเมื่อมีการเริ่มบริการที่ทำงานอยู่เบื้องหน้าใหม่ นอกจากนี้ API จะแจ้งให้เซิร์ฟเวอร์ระบบหยุดแอปบางแอปเมื่อผู้ใช้ขอ
[[["เข้าใจง่าย","easyToUnderstand","thumb-up"],["แก้ปัญหาของฉันได้","solvedMyProblem","thumb-up"],["อื่นๆ","otherUp","thumb-up"]],[["ไม่มีข้อมูลที่ฉันต้องการ","missingTheInformationINeed","thumb-down"],["ซับซ้อนเกินไป/มีหลายขั้นตอนมากเกินไป","tooComplicatedTooManySteps","thumb-down"],["ล้าสมัย","outOfDate","thumb-down"],["ปัญหาเกี่ยวกับการแปล","translationIssue","thumb-down"],["ตัวอย่าง/ปัญหาเกี่ยวกับโค้ด","samplesCodeIssue","thumb-down"],["อื่นๆ","otherDown","thumb-down"]],["อัปเดตล่าสุด 2025-07-27 UTC"],[],[],null,["# Task Manager\n\nIn Android 13, a new System UI affordance called the\n[Task Manager](https://developer.android.com/about/versions/13/changes/fgs-manager)\nnotifies the user about the state and resources being used by the foreground\nservices on background apps and enables the user to stop these apps.\n\nWith the introduction of [notification permissions](https://developer.android.com/about/versions/13/changes/notification-permission)\nin Android 13, users have control over turning off\nnotifications from background apps that run [foreground services](https://developer.android.com/guide/components/foreground-services)\nfor location, media playback and projection, data sync, video and voice calls,\nand connected devices. When such notifications are turned off, required\nnotifications from foreground services that indicate their state and resource\nusage to the user aren't displayed. The Task Manager adds an information bar\non the Quick Settings display to inform users of the apps running in the\nbackground and their usage of phone resources such as memory and battery. With\nthis interface, users are notified if an app is running a foreground service for\na long time and can choose to stop an app. The affordance is placed on the\ndisplay in a subtle way so it doesn't obstruct important notifications. See\n[Task Manager](https://developer.android.com/about/versions/13/changes/fgs-manager)\nfor more information.\n\nImplement Task Manager for background apps\n------------------------------------------\n\nAlthough a [reference AOSP implementation](https://cs.android.com/android/platform/superproject/+/android-latest-release:frameworks/base/packages/SystemUI/src/com/android/systemui/qs/FgsManagerController.kt)\nfor this feature is available, Android-powered device implementers can customize and\nmodify this System UI.\nThe stop affordance in the Task Manager mustn't be displayed for apps which are\ncore to the functionality of the device, such as Dialer and Camera.\n\nThe AOSP implementation uses a new internal [callback API](https://cs.android.com/android/platform/superproject/+/android-latest-release:frameworks/base/core/java/android/app/IForegroundServiceObserver.aidl)\nbetween the [System UI](https://cs.android.com/android/platform/superproject/+/android-latest-release:frameworks/base/packages/SystemUI)\nand [System Server](https://cs.android.com/android/platform/superproject/+/android-latest-release:frameworks/base/services/core/java/com/android/server). This API lets the System Server notify the System UI when new\nforeground services are started. The API also notifies the System Server to\nstop certain apps, when requested by the user.\n| **Note:** This feature can't be turned off.\n\nValidate Task Manager for background apps notifications\n-------------------------------------------------------\n\nFor manual testing, validate the Task Manager feature against apps that are\nrunning in the background.\n\nFor unit testing, use [unit tests](https://cs.android.com/android/platform/superproject/+/android-latest-release:frameworks/base/packages/SystemUI/multivalentTests/src/com/android/systemui/qs/FgsManagerControllerTest.java)\navailable in AOSP."]]