קל לארגן דפים בעזרת אוספים
אפשר לשמור ולסווג תוכן על סמך ההעדפות שלך.
ב-Android 13, מנהל המשימות הוא רכיב חדש בממשק המשתמש שמאפשר למשתמשים לדעת מה המצב והמשאבים שבהם נעשה שימוש על ידי שירותים בחזית באפליקציות ברקע, וגם להפסיק את האפליקציות האלה.
בעקבות ההשקה של הרשאות התראות ב-Android 13, למשתמשים יש שליטה על השבתת ההתראות מאפליקציות ברקע שמריצות שירותים שפועלים בחזית למיקום, להפעלה ולקרנה של מדיה, לסנכרון נתונים, לשיחות וידאו ושיחות קוליות ולמכשירים מחוברים. כשהתראות כאלה מושבתות, לא מוצגות התראות נדרשות משירותים שפועלים בחזית שמציינות למשתמש את המצב שלהם ואת השימוש במשאבים. מנהל המשימות מוסיף סרגל מידע במסך ההגדרות המהירות כדי להודיע למשתמשים על האפליקציות שפועלות ברקע ועל השימוש שלהן במשאבי הטלפון, כמו זיכרון וסוללה. בממשק הזה, המשתמשים מקבלים התראה אם אפליקציה מפעילה שירות בחזית במשך זמן רב, ויכולים לבחור להפסיק את האפליקציה. האפשרות הזו ממוקמת במסך בצורה עדינה כדי שלא תפריע להתראות חשובות. למידע נוסף, עיינו במאמר מנהל המשימות.
הטמעת מנהל המשימות לאפליקציות שפועלות ברקע
יש הטמעת AOSP לדוגמה של התכונה הזו, אבל מפתחי מכשירים מבוססי-Android יכולים להתאים אישית ולשנות את ממשק המשתמש הזה.
אסור להציג את סמל העצירה במנהל המשימות באפליקציות שהן חלק מהפונקציונליות המרכזית של המכשיר, כמו 'מרכז השיחות' ו'מצלמה'.
הטמעת AOSP משתמשת ב-callback API פנימי חדש בין System UI לבין System Server. ממשק ה-API הזה מאפשר לשרת המערכת להודיע לממשק המשתמש של המערכת כששירותים חדשים בחזית מתחילים לפעול. ה-API גם מודיע לשרת המערכת לעצור אפליקציות מסוימות, לפי בקשת המשתמש.
אימות של מנהל המשימות לקבלת התראות מאפליקציות ברקע
לבדיקה ידנית, מאמתים את התכונה 'מנהל המשימות' באפליקציות שפועלות ברקע.
לבדיקת יחידה, משתמשים בבדיקות יחידה שזמינות ב-AOSP.
דוגמאות התוכן והקוד שבדף הזה כפופות לרישיונות המפורטים בקטע רישיון לתוכן. Java ו-OpenJDK הם סימנים מסחריים או סימנים מסחריים רשומים של חברת Oracle ו/או של השותפים העצמאיים שלה.
עדכון אחרון: 2025-07-27 (שעון UTC).
[[["התוכן קל להבנה","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."]]