{
	"id": "8f693383-f128-4a65-a445-fcec8b1802d3",
	"created_at": "2026-04-06T00:19:30.03052Z",
	"updated_at": "2026-04-10T03:21:31.713661Z",
	"deleted_at": null,
	"sha1_hash": "41ccc6e4c2831d7cebfe5deb0d36fd380b27d287",
	"title": "Restrictions on starting activities from the background",
	"llm_title": "",
	"authors": "",
	"file_creation_date": "0001-01-01T00:00:00Z",
	"file_modification_date": "0001-01-01T00:00:00Z",
	"file_size": 277782,
	"plain_text": "Restrictions on starting activities from the background\r\nArchived: 2026-04-05 21:44:47 UTC\r\nAndroid 10 (API level 29) and higher place restrictions on when apps can start activities when the app runs in the\r\nbackground. These restrictions help minimize interruptions for the user and keep the user more in control of what's\r\nshown on their screen.\r\nThis guide presents notifications as an alternative for starting activities from the background. It also lists the\r\nspecific cases where the restriction doesn't apply.\r\nDisplay notifications instead\r\nIn nearly all cases, apps in the background must display time-sensitive notifications to provide urgent information\r\nto the user instead of directly starting an activity. Such notifications include handling an incoming phone call or an\r\nactive alarm clock.\r\nThis notification-based alert and reminder system provides several advantages for users:\r\nWhen using the device, the user sees a heads-up notification that lets them respond. The user maintains\r\ntheir current context and has control over the content that they see on the screen.\r\nTime-sensitive notifications respect the user's Do Not Disturb rules. For example, users might permit calls\r\nonly from specific contacts or from repeat callers when Do Not Disturb is enabled.\r\nWhen the device's screen is off, the full-screen intent launches immediately.\r\nIn the device's Settings screen, the user can see which apps have recently sent notifications, including from\r\nspecific notification channels. From this screen, the user can control their notification preferences.\r\nWhen apps can start activities\r\nApps running on Android 10 or higher can start activities when one or more of the following conditions are met:\r\nThe app has a visible window, such as an activity in the foreground.\r\nThe app has an activity in the back stack of the foreground task.\r\nThe app has an activity in the back stack of an existing task on the Recents screen.\r\nThe app has an activity that started very recently.\r\nThe app called finish() on an activity very recently. This applies only when the app had either an\r\nactivity in the foreground or an activity in the back stack of the foreground task at the time finish() was\r\ncalled.\r\nThe app has one of the following services that is bound by the system. These services might need to launch\r\na UI.\r\nhttps://developer.android.com/guide/components/activities/background-starts\r\nPage 1 of 4\n\nAccessibilityService\r\nAutofillService\r\nCallRedirectionService\r\nHostApduService\r\nInCallService\r\nTileService (Not applicable in Android 14 (API level 34) and higher)\r\nVoiceInteractionService\r\nVrListenerService .\r\nThe app has a service that is bound by a different, visible app. The app bound to the service must remain\r\nvisible for the app in the background to start activities successfully.\r\nThe app receives a notification PendingIntent from the system. In the case of pending intents for\r\nservices and broadcast receivers, the app can start activities for a few seconds after the pending intent is\r\nsent.\r\nThe app receives a PendingIntent that is sent from a different, visible app.\r\nThe app receives a system broadcast where the app is expected to launch a UI. Examples include\r\nACTION_NEW_OUTGOING_CALL and SECRET_CODE_ACTION . The app can start activities for a few seconds\r\nafter the broadcast is sent.\r\nThe app is associated with a companion hardware device through the CompanionDeviceManager API. This\r\nAPI lets the app start activities in response to actions that the user performs on a paired device.\r\nThe app is a device policy controller running in device owner mode. Example use cases include fully\r\nmanaged enterprise devices as well as dedicated devices like digital signage and kiosks.\r\nThe app is granted the SYSTEM_ALERT_WINDOW permission by the user.\r\nOpt-In required when starting activities from PendingIntents\r\nTo avoid allowing accidental Activity starts based on the listed conditions, starting with Android 14 there are\r\nexplicit APIs that allow you to opt in or out of granting an app permissions for Activity starts.\r\nApps targeting Android 15 or higher will default to no longer implicitly granting background activity launch\r\n(BAL) privileges to PendingIntents they create. Explicit opt-in is required, in order to do so, these are the\r\noptions depending if the app is sending or creating PendingIntents .\r\nhttps://developer.android.com/guide/components/activities/background-starts\r\nPage 2 of 4\n\nFigure 1: Decision flow for background activity launches.\r\nBy the Sender of the PendingIntent\r\nApps targeting Android 14 or higher that want to start a PendingIntent must\r\nfulfill the listed conditions and\r\nopt in to allow background activity launch based on those exceptions\r\nThis opt-in should only happen if the app developer knows that the app is going to start an Activity.\r\nTo opt in, the app should pass an ActivityOptions bundle with\r\nsetPendingIntentBackgroundActivityStartMode(ActivityOptions.MODE_BACKGROUND_ACTIVITY_START_ALLOWED)\r\nto the PendingIntent.send() or similar methods.\r\nBy the Creator of the PendingIntent\r\nApps targeting Android 15 or higher that create a PendingIntent must now explicitly opt in to allow background\r\nactivity launch if they want those PendingIntents to be startable under the listed conditions.\r\nIn most cases, the app starting the PendingIntent should be the one to opt in. However, if the creating app needs\r\nto grant these privileges:\r\nThe PendingIntent can be started at any time the creating app is visible.\r\nThe PendingIntent can be started at any time if the creating app has special privileges.\r\nTo opt in, the app should pass an ActivityOptions bundle with\r\nsetPendingIntentCreatorBackgroundActivityStartMode\r\n(ActivityOptions.MODE_BACKGROUND_ACTIVITY_START_ALLOWED) to the PendingIntent.getActivity() or similar\r\nmethods.\r\nRead the relevant reference documentation for further details:\r\nActivityOptions.setPendingIntentBackgroundActivityStartMode\r\nhttps://developer.android.com/guide/components/activities/background-starts\r\nPage 3 of 4\n\nActivityOptions.setPendingIntentCreatorBackgroundActivityStartMode\r\nStrict Mode\r\nStarting with Android 16, the app developer can enable Strict mode to get notified when an activity launch is\r\nblocked (or at risk of getting blocked when the app's target SDK is raised).\r\nExample code to enable from early in your Application, Activity, or other application component's\r\nApplication.onCreate() method:\r\n override fun onCreate(savedInstanceState: Bundle?) {\r\n super.onCreate(savedInstanceState)\r\n StrictMode.setVmPolicy(\r\n StrictMode.VmPolicy.Builder()\r\n .detectBlockedBackgroundActivityLaunch()\r\n .penaltyLog()\r\n .build());\r\n )\r\n }\r\nRead the Strict mode documentation for more details.\r\nSource: https://developer.android.com/guide/components/activities/background-starts\r\nhttps://developer.android.com/guide/components/activities/background-starts\r\nPage 4 of 4",
	"extraction_quality": 1,
	"language": "EN",
	"sources": [
		"MITRE"
	],
	"references": [
		"https://developer.android.com/guide/components/activities/background-starts"
	],
	"report_names": [
		"background-starts"
	],
	"threat_actors": [],
	"ts_created_at": 1775434770,
	"ts_updated_at": 1775791291,
	"ts_creation_date": 0,
	"ts_modification_date": 0,
	"files": {
		"pdf": "https://archive.orkl.eu/41ccc6e4c2831d7cebfe5deb0d36fd380b27d287.pdf",
		"text": "https://archive.orkl.eu/41ccc6e4c2831d7cebfe5deb0d36fd380b27d287.txt",
		"img": "https://archive.orkl.eu/41ccc6e4c2831d7cebfe5deb0d36fd380b27d287.jpg"
	}
}