What is the Don’t Keep Activities developer option and why is it useful?
Copied from ?
Google offers a wide array of runtime debugging options for devices that can be activated under Settings > Developer options.
One of the more useful ones is Don’t keep activities which immediately destroys an activity when the user leaves it.
It’s useful for testing activity save and restore (i.e., the onSaveInstanceState(Bundle) and onCreate(bundle) code path), which would otherwise be difficult to trigger.
It can also uncover other symmetry problems with your activity’s life cycle, such as properly opening and closing resources between onResume() and onPause() callbacks, for instance.