How Broadcast Receiver Works in Android
I have a question about BroadcastReceiver in Android, say system broadcast receiver BOOT_COMPLETED
. If I wrote a listener to broadcast after booting the system and installing it. How will the Android system know to notify my application since my application is not running but just installed? Unless all derived BroadcastReceiver classes are always in memory (or the system loads them into memory after loading), and whenever any broadcast occurs, the entire corresponding application can receive it.
Thanks Braj
source to share
When the BOOT_COMPLETED broadcast is sent, the Android system checks the downloaded app manifests to see if there is anything designed to handle this message. The same is true for implicit intents and all transfers.
Manifests are open source and let the system know what your application can and will do.
source to share