Stay organized with collections
Save and categorize content based on your preferences.
As part of the Android 8.0 (API level 26) background execution
limits, apps that target the
API level 26 or higher can't register broadcast receivers for implicit
broadcasts in their manifest unless the broadcast is sent specifically to them.
However, several broadcasts are exempted from these limitations. Apps can
continue to register listeners for the following broadcasts, no matter what API
level the apps target.
Exempted because these broadcasts are sent only once, at first boot,
and many apps need to receive these broadcasts, such as to schedule jobs and alarms.
Apps that have visibility into an account receive this broadcast when the
account is removed. If this is the only account change that the app needs
to act on, we recommend that the app use this broadcast
instead of the deprecated
LOGIN_ACCOUNTS_CHANGED_ACTION.
Some apps need to update their stored data when another package is
removed. For those apps, there is no good alternative to registering for this
broadcast.
Note: Other package-related broadcasts (such as ACTION_PACKAGE_REPLACED) are not exempted from
the background execution restrictions. These broadcasts are common enough that there is a
potential performance impact to exempting them.
Sent by the calendar
provider to post an event
reminder to the calendar app. Since the calendar provider doesn't know what
the calendar app is, this broadcast must be implicit.
These broadcasts are sent as a result of the user's physical interactions with
the device, like installing or removing storage volumes, or as part of
boot initialization, as available volumes get mounted. They aren't a common
occurrence, and are usually under the user’s control.
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2024-01-05 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-01-05 UTC."],[],[],null,["# Implicit broadcast exceptions\n\nAs part of the Android 8.0 (API level 26) [background execution\nlimits](/about/versions/oreo/background#broadcasts), apps that target the\nAPI level 26 or higher can't register broadcast receivers for implicit\nbroadcasts in their manifest unless the broadcast is sent specifically to them.\nHowever, several broadcasts are exempted from these limitations. Apps can\ncontinue to register listeners for the following broadcasts, no matter what API\nlevel the apps target.\n| **Note:** Even though these implicit broadcasts still work in the background, avoid registering listeners for them.\n\n[ACTION_LOCKED_BOOT_COMPLETED](/reference/android/content/Intent#ACTION_LOCKED_BOOT_COMPLETED), [ACTION_BOOT_COMPLETED](/reference/android/content/Intent#ACTION_BOOT_COMPLETED)\n: Exempted because these broadcasts are sent only once, at first boot,\n and many apps need to receive these broadcasts, such as to schedule jobs and alarms.\n\n[ACTION_USER_INITIALIZE](/reference/android/content/Intent#ACTION_USER_INITIALIZE), `android.intent.action.USER_ADDED`, `android.intent.action.USER_REMOVED`\n: Privileged permissions protect these broadcasts, so most normal\n apps can't receive them anyway.\n\n`android.intent.action.TIME_SET`, [ACTION_TIMEZONE_CHANGED](/reference/android/content/Intent#ACTION_TIMEZONE_CHANGED), [ACTION_NEXT_ALARM_CLOCK_CHANGED](/reference/android/app/AlarmManager#ACTION_NEXT_ALARM_CLOCK_CHANGED)\n: Clock apps might need to receive these broadcasts to update alarms when the\n time, timezone, or alarms change.\n\n[ACTION_LOCALE_CHANGED](/reference/android/content/Intent#ACTION_LOCALE_CHANGED)\n: Only sent when the locale changes, which is not often. Apps might need to\n update their data when the locale changes.\n\n[ACTION_USB_ACCESSORY_ATTACHED](/reference/android/hardware/usb/UsbManager#ACTION_USB_ACCESSORY_ATTACHED), [ACTION_USB_ACCESSORY_DETACHED](/reference/android/hardware/usb/UsbManager#ACTION_USB_ACCESSORY_DETACHED), [ACTION_USB_DEVICE_ATTACHED](/reference/android/hardware/usb/UsbManager#ACTION_USB_DEVICE_ATTACHED), [ACTION_USB_DEVICE_DETACHED](/reference/android/hardware/usb/UsbManager#ACTION_USB_DEVICE_DETACHED)\n: When an app needs to know about these USB-related events, there is no\n good alternative to registering for the broadcast.\n\n[BluetoothHeadset.ACTION_CONNECTION_STATE_CHANGED](/reference/android/bluetooth/BluetoothHeadset#ACTION_CONNECTION_STATE_CHANGED), [BluetoothA2dp.ACTION_CONNECTION_STATE_CHANGED](/reference/android/bluetooth/BluetoothA2dp#ACTION_CONNECTION_STATE_CHANGED), [ACTION_ACL_CONNECTED](/reference/android/bluetooth/BluetoothDevice#ACTION_ACL_CONNECTED), [ACTION_ACL_DISCONNECTED](/reference/android/bluetooth/BluetoothDevice#ACTION_ACL_DISCONNECTED)\n: User experience is not likely to suffer if apps receive broadcasts for these\n Bluetooth events.\n\n[ACTION_CARRIER_CONFIG_CHANGED](/reference/android/telephony/CarrierConfigManager#ACTION_CARRIER_CONFIG_CHANGED), `TelephonyIntents.ACTION_*_SUBSCRIPTION_CHANGED`, `TelephonyIntents.SECRET_CODE_ACTION`, [ACTION_PHONE_STATE_CHANGED](/reference/android/telephony/TelephonyManager#ACTION_PHONE_STATE_CHANGED), [ACTION_PHONE_ACCOUNT_REGISTERED](/reference/android/telecom/TelecomManager#ACTION_PHONE_ACCOUNT_REGISTERED), [ACTION_PHONE_ACCOUNT_UNREGISTERED](/reference/android/telecom/TelecomManager#ACTION_PHONE_ACCOUNT_UNREGISTERED)\n: OEM telephony apps might need to receive these broadcasts.\n\n[LOGIN_ACCOUNTS_CHANGED_ACTION](/reference/android/accounts/AccountManager#LOGIN_ACCOUNTS_CHANGED_ACTION)\n: Some apps need to know about changes to login accounts so they can set up\n scheduled operations for the new and changed accounts.\n\n[ACTION_ACCOUNT_REMOVED](/reference/android/accounts/AccountManager#ACTION_ACCOUNT_REMOVED)\n: Apps that have visibility into an account receive this broadcast when the\n account is removed. If this is the only account change that the app needs\n to act on, we recommend that the app use this broadcast\n instead of the deprecated\n [LOGIN_ACCOUNTS_CHANGED_ACTION](/reference/android/accounts/AccountManager#LOGIN_ACCOUNTS_CHANGED_ACTION).\n\n[ACTION_PACKAGE_DATA_CLEARED](/reference/android/content/Intent#ACTION_PACKAGE_DATA_CLEARED)\n: Only sent when the user explicitly clears their data from Settings,\n so broadcast receivers are unlikely to significantly affect user experience.\n\n[ACTION_PACKAGE_FULLY_REMOVED](/reference/android/content/Intent#ACTION_PACKAGE_FULLY_REMOVED)\n\n: Some apps need to update their stored data when another package is\n removed. For those apps, there is no good alternative to registering for this\n broadcast.\n\n **Note:** Other package-related broadcasts (such as [ACTION_PACKAGE_REPLACED](/reference/android/content/Intent#ACTION_PACKAGE_REPLACED)) are *not* exempted from\n the background execution restrictions. These broadcasts are common enough that there is a\n potential performance impact to exempting them.\n\n[ACTION_NEW_OUTGOING_CALL](/reference/android/content/Intent#ACTION_NEW_OUTGOING_CALL)\n\n: Apps that take action in response to users placing calls need to receive this\n broadcast.\n\n[ACTION_DEVICE_OWNER_CHANGED](/reference/android/app/admin/DevicePolicyManager#ACTION_DEVICE_OWNER_CHANGED)\n\n: This broadcast is not sent very often. Some apps need to receive it, so that\n they know that the device's security status changed.\n\n[ACTION_EVENT_REMINDER](/reference/android/provider/CalendarContract#ACTION_EVENT_REMINDER)\n\n: Sent by the [calendar\n provider](/guide/topics/providers/calendar-provider) to post an event\n reminder to the calendar app. Since the calendar provider doesn't know what\n the calendar app is, this broadcast must be implicit.\n\n[ACTION_MEDIA_MOUNTED](/reference/android/content/Intent#ACTION_MEDIA_MOUNTED), [ACTION_MEDIA_CHECKING](/reference/android/content/Intent#ACTION_MEDIA_CHECKING), [ACTION_MEDIA_UNMOUNTED](/reference/android/content/Intent#ACTION_MEDIA_UNMOUNTED), [ACTION_MEDIA_EJECT](/reference/android/content/Intent#ACTION_MEDIA_EJECT), [ACTION_MEDIA_UNMOUNTABLE](/reference/android/content/Intent#ACTION_MEDIA_UNMOUNTABLE), [ACTION_MEDIA_REMOVED](/reference/android/content/Intent#ACTION_MEDIA_REMOVED), [ACTION_MEDIA_BAD_REMOVAL](/reference/android/content/Intent#ACTION_MEDIA_BAD_REMOVAL)\n\n: These broadcasts are sent as a result of the user's physical interactions with\n the device, like installing or removing storage volumes, or as part of\n boot initialization, as available volumes get mounted. They aren't a common\n occurrence, and are usually under the user's control.\n\n[SMS_RECEIVED_ACTION](/reference/android/provider/Telephony.Sms.Intents#SMS_RECEIVED_ACTION), [WAP_PUSH_RECEIVED_ACTION](/reference/android/provider/Telephony.Sms.Intents#WAP_PUSH_RECEIVED_ACTION)\n\n: SMS recipient apps rely on these broadcasts."]]