Reputation: 3155
I have a question about BroadcastReceiver in Android, say, about system broadcast receiver BOOT_COMPLETED
. If I have written a listener to Broadcast after system is booted and installed it. How the android system would know that it has to notify my application, since my application is not running but just installed? Is it that, all BroadcastReceiver derived classes are always in the memory (or system loads them in the memory after bootup) and whenever any broadcast happens, all relevant application can receive it.
Thanks Braj
Upvotes: 4
Views: 1552
Reputation: 3282
When the broadcast BOOT_COMPLETED is sent, the Android system checks the manifests of loaded apps to see if anything is meant to handle that message. The same is true for implicit intents, and all broadcasts.
Manifests are public facing and allows the system to know what your app can and will do.
Upvotes: 4