Looking at the Activity Life Cycle diagram, I notice that onPause()
and onStop()
can both lead to the \"process\" being killed. This would require
Another example would be to register and unregister a broadcast receiver.
Note that usually these things are placed in onResume and onPause, the difference is subtle though, onResume/onPause are called when the activity gets placed behind another activity, onStart/onStop are called when the activity is no longer visible in the screen.