There is no way to do this. When you press back, your instance of the
application is over, therefore there is no instance state to save.
Perhaps you are saving something in instance state that doesn't really
belong there? Persistent state and instance state are two different
things. Data that needs to be saved into the persistent state should
be saved in onPause, not onSaveInstanceState.

Cheers,
Justin
Android Team @ Google

On Jan 11, 7:45 am, Orde <[email protected]> wrote:
> What if we wanted to force the system to save the bundle when back
> button is pressed? Currently I believe that
> pressing MENU calls:
> -onSaveInstanceState
> -onPause
> -onStop
>
> pressing back calls:
> -onPause
> -onStop
> -onDestroy
>
> Ideally I would like to force my app to call onSaveInstanceState even
> when back is pressed
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to