I don't think that onDestroy is guaranteed to be called. My
understanding is that the system chooses when/whether to destroy it.
But onPause is guaranteed to be called, and you can check isFinishing
to see whether the activity is finishing in the onPause.
On Feb 14, 11:25 am, guich wrote:
> Hi,
>
Hi Mark,
Very strange. I'm sending messages to the console and it really shows
only the onPause method, and not the onDestroy. I'm pretty sure
something changed (or maybe is a new bug in 2.2).
Anyway, i added a thread with a sleep that calls System.exit if the
app doesn't exit after a second.
When an activity is *finishing*, the onDestroy will be called.
The documentation states that onPause is guaranteed to be called, but not
the onDestroy in case an activity is part of a process that is about to be
killed:
Apps with foreground activities won't be killed --> onPause will be called,
Hi,
> I don't think that onDestroy is guaranteed to be called. My
> understanding is that the system chooses when/whether to destroy it.
> But onPause is guaranteed to be called, and you can check isFinishing
> to see whether the activity is finishing in the onPause.
In my situation, the isFinish
Thanks for the isFinishing tip. Now i'm using it onFinish and
checking, and it works fine. I no longer trust at onDestroy. :-)
regards
guich
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android
On Mon, Feb 14, 2011 at 1:39 PM, guich wrote:
> Very strange. I'm sending messages to the console and it really shows
> only the onPause method, and not the onDestroy. I'm pretty sure
> something changed (or maybe is a new bug in 2.2).
I'm pretty sure nothing changed, at least for normal stuff. Y
6 matches
Mail list logo