BroadcastReceiver lifecycle
android, android-lifecycle, broadcastreceiver, service
Solution
Declare broadcast receiver in manifest to achieve independent life cycle for it.
http://developer.android.com/reference/android/content/BroadcastReceiver.html
Problem
1) I have an Activity. This Activity starts a service, which in turn creates and registers a BroadcastReceiver. 2) I have an Activity. This Activity creates and registers a BroadcastReceiver. When does BroadcastReceiver's life end in each of the above cases? In other words - when it gets destroyed and won't listen to broadcasts anymore?