Android onSaveInstanceState and starting sub-activities.
<p>I have an app which has a main activity that calls other activities on a button press. </p>

<p>The main activity hosts a class which contains a lot of data and is parcelable. the data is the backbone for the application and I need to save it across orientation changes. In order to achieve this it use onSaveInstanceState and put the parcelable object in the bundle. </p>

<p>However, I have noticed that onSaveInstanceState is called everytime i press a button and start one of the new activities as well as on orientation changes. This is slightly slowing down the transition to the other screens. </p>

<p>Is there a good way to only store this information when I know for definite that the activity will be destroyed rather than every time I navigate away from the Activity periodically. I understand that the minute I navigate away from the main activity there is a chance that it may get destroyed. </p>

<p>Thanks, 
M&lt;</p>
