I have the following situation:
- Activity A starts activity B
- Action A calls methods
onPause, onSaveInstanceStateand onStop. - In step B, I press the UP button on the action bar
- Action A is first destroyed (called
onDestroy) and then recreated. (This seems to be happening this way. I haven't implemented this path, it just seems like it's an Android way.) - During the method, the
onCreatevariable is savedInstanceStatealways zero.
I know that there were similar topics, but none of them seemed to respond to my situation. All callback methods have log lines in them, so Iām sure that the save method is executed and destory is running. But why is there no object savedInstanceState?
My save method:
@Override
public void onSaveInstanceState(Bundle savedInstanceState) {
savedInstanceState.putSerializable(OpenSessionsActivity.SESSION, session);
System.out.println("saving ..");
super.onSaveInstanceState(savedInstanceState);
}
- , ?