I\'m trying to save and restore the state of an Activity
using the methods onSaveInstanceState()
and onRestoreInstanceState()
.
It is not necessary that onRestoreInstanceState will always be called after onSaveInstanceState.
Note that : onRestoreInstanceState will always be called, when activity is rotated (when orientation is not handled) or open your activity and then open other apps so that your activity instance is cleared from memory by OS.