[android-developers] Re: finish doesn't call onDestroy on Android 2.2

2011-02-14 Thread John
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, >

[android-developers] Re: finish doesn't call onDestroy on Android 2.2

2011-02-14 Thread guich
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.

[android-developers] Re: finish doesn't call onDestroy on Android 2.2

2011-02-14 Thread Streets Of Boston
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,

[android-developers] Re: finish doesn't call onDestroy on Android 2.2

2011-02-14 Thread guich
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

[android-developers] Re: finish doesn't call onDestroy on Android 2.2

2011-02-14 Thread guich
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

Re: [android-developers] Re: finish doesn't call onDestroy on Android 2.2

2011-02-14 Thread Mark Murphy
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