--
You received this message because you are subscribed to the Google Groups "android-platform" group.
To post to this group, send email to android-...@googlegroups.com.
To unsubscribe from this group, send email to android-platfo...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/android-platform?hl=en.
Do it in onpause().
On Dec 8, 2010 1:01 PM, "itay masarano" <imas...@gmail.com> wrote:
But if the user press on the "back" button the app call the onDestory() and i want to save the state before, how can i achieve it ?
On Wed, Dec 8, 2010 at 7:27 AM, ABTHUL RAZEETH <abthul...@gmail.com> wrote:
>
> If the activit...
--
You received this message because you are subscribed to the Google Groups "android-platform" gr...
You received this message because you are subscribed to the Google Groups "android-platform" group.
To post to this group, send email to android-...@googlegroups.com.
To unsubscribe from this group, send email to android-platfo...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/android-platform?hl=en.
But the Bundle is not in argument of the onPause()?
How can i tell android to save the bundle?
--
onCreate(Bundle) or
onRestoreInstanceState(Bundle) (the Bundle populated by this method
will be passed to both).
"Hi,
The documentation is correct because in the case of a finish() call, there is no app to refer to an 'instance' to restore said '...per-instance state...' to anymore.
For clarity; 'killed' in your (Itay's) example refers to when the memory management code garbage collects the process as an attempt to provide more memory for running or newly launching processes.
As such, this is analogous to it being 'paged out' in a traditional OS, and could mean the process will be called back to the foreground. (In this analogy, the data being paged out would be your Bundle object)
When the 'finish' method is run, it is in an instance where the app is being 'closed', rather than backgrounded, and any normal final functions should be performed (such as saving any state to non-volatile memory) as would be the case of a normally terminating process in a traditional OS.
Hope that helps!
- John.
[On the move, responses may be delayed]