posted 11 years ago
onSaveInstanceState() is a method used to store data before Pausing the activity & onRestoreInstanceState() is method used to retrieve that data back.
Consider this example here:
You app has 3 edit boxes where user was putting in some info , but he gets a call so if you didnt use the above methods what all he entered will be lost.
So always save the current data in onPause() method of Activity as a bundle & in onResume() method call the onRestoreInstanceState() method . !
Hope this helped