I have an application which tells the state of the device (Connected/Disconnected). Now I have registered the Broadcast Receiver for the same and display the appropriate state.
1. But my problem is that I have to make this status message common to all the activities. So where do I register this receiver and where do I unregister the receiver. I dont want the repeatative code. So is there any place from which I can do an common register and unregister instead of unregistering it in every activity for onDestroy().
Can I use the Application class in any way so as to have an common place to register and unregister?
Or is the Manifest file appropriate in my case to register the receiver
Thanks, Shraddha