Skip to content Skip to sidebar Skip to footer

Android Broadcastreceiver And Activity.onpause()

The documentation for BroadcastReceiver says: If registering a receiver in your Activity.onResume() implementation, you should unregister it in Activity.onPause(). (

Solution 1:

The document meant to say that if you unregistered in onPause() then you won't receive broadcast intents when paused. If you do not unregistered then you would continue to receive broadcast intents. You unregistered in onDestroy(), but when the home key is pressed only onStop() is called and onDestroy() will not be called. Thus you continue to receive broadcast.


Post a Comment for "Android Broadcastreceiver And Activity.onpause()"