Actually, he should save as much as is practical before onDestroy() is
called, in onPause(), since once onPause() is called, the hosting
process is killable: there is no guarantee that onDestroy() or
onStop() will be called at all.

On Jul 14, 7:25 am, Raghav Sood <[email protected]> wrote:
> Save all your data in onDestroy() and read it in onCreate. That way your
> data will be saved when the app is destroyed and you can recover it in
> onCreate().
>
> On Thu, Jul 14, 2011 at 7:42 PM, dillipk <[email protected]> wrote:
> > Thank you for the replies..
>
> > I understand that, my app no way can listen to any event when , killed
> > by a task killer.
>
> > But,  WHY my app behaves weird when it restarts from that point?  As I
> > mentioned - instead of starting the App gracefully(by starting the
> > first screen which is a splash screen), it directly go to some other
> > screen with EMPTY data.. Whole app behaves wired and the data is empty
> > everywhere.
>
> > Any idea? or any work around to fix this?
>
> > Thanks,
> > DK
>
> > On Jul 13, 8:07 pm, Dianne Hackborn <[email protected]> wrote:
> > > A task killer doesn't do anything more than the platform would when it
> > needs
> > > to kill your process when it is in the background.  You just need to deal
> > > with this case.
>
> > > On Wed, Jul 13, 2011 at 9:22 AM, dillipk <[email protected]>
> > wrote:
> > > > Hello,
> > > >   My app have some issues after being killed by Task Killer.
>
> > > > Sequence: -
> > > > - Run the app
> > > > - Press HOME key
> > > > - Kill all the tasks by TaskKiller
> > > > - Again run the app..
>
> > > >  At this point, instead of starting the App gracefully(by starting the
> > > > first screen which is a splash screen), it directly go to some other
> > > > screen with EMPTY data.. Whole app behaves wired and the data is empty
> > > > everywhere.
>
> > > > Can my app listen to any event, when it is killed by a TaskKiller..? I
> > > > tried debugging by going to onDestroy(), but it never got fired..
>
> > > > Any help on this would greatly appreciated..
>
> > > > Thanks in advance..
>
> > > > DK
>
> > > > --
> > > > 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
>
> > > --
> > > Dianne Hackborn
> > > Android framework engineer
> > > [email protected]
>
> > > Note: please don't send private questions to me, as I don't have time to
> > > provide private support, and so won't reply to such e-mails.  All such
> > > questions should be posted on public forums, where I and others can see
> > and
> > > answer them.
>
> > --
> > 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
>
> --
> Raghav 
> Soodhttp://www.raghavsood.com/http://wiki.androidappcheck.com/http://www.telstop.tel/https://market.android.com/developer?pub=Raghav+Sood

-- 
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