Well, as you'll read in the docs, it's during onSaveInstanceState()
that you save the state that will be restored when your app is
restarted due being killed by the OS.

The saving you do in onPause() is the normal kind of saving you do;
saving the user's inputs and the like.

The kind of saving you do in onSaveInstanceState() has more to do with
the inner workings of the app. And example that I've found is the need
to save the item that user has selected in a Context Menu. Although
things appear correct, if you haven't saved the item that the context
menu pertains to, your code isn't going to work.


On Sep 21, 9:13 am, Chris Stratton <cs07...@gmail.com> wrote:
> How well they restore state depends on how the app author has handled
> the onPause which is called when the app first went into the
> background and became fair game for killing.
>
> Typically for example an email your were editing will now be a saved
> draft, a moves-based game will be exactly as before,  but a half
> filled web form night just be gone.
>
> On Sep 21, 8:32 am, Brion Emde <brione2...@gmail.com> wrote:
>
>
>
> > Yes, that is exactly what it means. From the user's perspective,
> > nothing has happened: when they come back to app #1, it has been
> > restarted, has restored its state and things look exactly like they
> > did when the user was there before.
>
> > If you want to notify the user somehow, you would do that in your
> > onPause() method.
>
> > On Sep 21, 5:45 am, parag <parag.shetgaon...@gmail.com> wrote:
>
> > > Hi Jerome,
>
> > > Thanks for  th information,
> > > so does that mean that, there is a possibility that some apps will be
> > > closed, without notifying the user?
>
> > > Thanks in advance
>
> > > On Sep 21, 1:13 pm, Jerome Deng <deng.jer...@gmail.com> wrote:
>
> > > > If there is less memory available, the resource used by the paused
> > > > apps will be recycled by Davilk VM.
> > > > When you open the first app again, it will be relaunched. But not all
> > > > previously opened apps must restarted, as they may be still in paused
> > > > state.
>
> > > > On Sep 21, 2:10 pm, parag <parag.shetgaon...@gmail.com> wrote:
>
> > > > > hi folks,
>
> > > > > i have a situation, i want to know that following,
>
> > > > > suppose I have opened 9 apps,  i want to open the 10th one,
> > > > > The previous opened apps are in background,
>
> > > > > if there is less memory available, will some of the earlier opened app
> > > > > be closed without notification or the state will be saved , so that
> > > > > when i open the first app again it will resume rather then start all
> > > > > over again?
>
> > > > > reg
> > > > > Parag- Hide quoted text -
>
> > > > - Show quoted text -

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to