I\'m trying to save and restore the state of an Activity using the methods onSaveInstanceState() and onRestoreInstanceState().
Activity
onSaveInstanceState()
onRestoreInstanceState()
I think this thread was quite old. I just mention another case, that onSaveInstanceState() will also be called, is when you call Activity.moveTaskToBack(boolean nonRootActivity).
Activity.moveTaskToBack(boolean nonRootActivity)