Reputation: 129
I know that onPause, onStop and onSavedInstanceData will be called when home button pressed, but how do i know when android system kill my app or destroy it in task manager?
Upvotes: 0
Views: 1492
Reputation: 3026
Please note that when we press back button i.e., ourself close the activity then onSaveInstance() is not called.
Whenever android system destroy your activity because of low memory conditions onSaveInstance and then onRestoreInstance is called when it is recreated. Hence you should save the state in onSaveInstance.
Upvotes: 3