I have a confusion regarding what should go in
Commit unsaved changes, but only if users expect such changes to be permanently saved when they leave (such as a draft email).
you should use onStop() to perform larger, more CPU intensive shut-down operations, such as writing information to a database.
your activity might have more state information that you'd like to restore, such as member variables that track the user's progress in the activity.
Everything that you want to be persistent must be stored in
onPause() because some Android versions consider your app to be killable after
The somewhat unclear distinction is being made because
onPause() occurs relatively often, and also under many circumstances where you probably wouldn't save the state for an
onResume() of the same Activity. Hence, everyone wants you to think twice before you perform expensive operations in
Your question regarding storing form data, well, you could make that persistent right when an input field loses focus, if it's really totally intended that the user sees the same form data even after he stopped the app and started it again.