XDA Developers

android git

Readers like you help support XDA Developers. When you make a purchase using links on our site, we may earn an affiliate commission. Read More.

latest

Broadcast Receivers ACTION_SHUTDOWN Broadcast Intent
Documentation Error: Manifest Registered Broadcast Receivers Receive ACTION_SHUTDOWN Intents in Android 8.0

Manifest Registered Broadcast intents are limited to only a few in Android Oreo, and ACTION_SHUTDOWN isn't one of them, or is it?

4
By 

Android uses broadcast intents for a lot of things. App developers can listen for them to perform certain actions, such as when the MEDIA_MOUNTED broadcast intent for applications to know when an SD card has been mounted as storage. As an app developer, you can program broadcast receivers for this, then call a function whenever media is mounted, for example, to change the app's default storage directory to the SD card. This kind of thing is what broadcast intents are used for. They are mostly used to broadcast certain system events to any applications that may need that information. Broadcast receivers need to either be registered in the Android Manifest file or programmatically when in the foreground.