As Kostya obliquely pointed out, it is onPause() that should be called, not onStop(). There is the natural pair: onResume() and onPause(). If you are in the Resumed state, you should expect the phone to call onPause() before it ever calls onStop() (as it will when the Activity goes invisible).
Theoretically (that is, according to the strict wording of the lifecycle document), there are exceptions (onPause is killable), but they are very rare. Even on my memory-starved phone I have always seen onPause() called first. Many Activities will have nothing to do for onStop() anyway: serious data saving should have already been done on onPause(). But if you are using a BroadcastReceiver unique to your app, then you would unregister it in onStop(). On Oct 7, 7:51 am, sdphil <phil.pellouch...@gmail.com> wrote: > it should at least call onStop -- because the activity is no longer > visible. > > On Oct 7, 7:10 am, Prakash Iyer <thei...@gmail.com> wrote:> It is not > required that an onPause is always followed by onStop - in fact if > > you press the home key that's what I have seen as the default behavior. This > > way if the user goes back to your app, thru the home key press or from > > launchpad, the onResume will be called and it will all be much faster than > > doing an onCreate which would otherwise have been required. > > > On Thu, Oct 7, 2010 at 10:06 AM, sdphil <phil.pellouch...@gmail.com> wrote: > > > I am seeing an issue where when I hit the "back" button, I get the > > > onPause call, but it isn't followed by onStop and onDestroy. > > > > On most phones, I see this, but on one particular phone (Droid-X), I > > > don't.... > > > > Any ideas? > > > > tia. > > > > -- > > > 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<android-developers%2bunsubscr...@googlegroups.com> > > > For more options, visit this group at > > >http://groups.google.com/group/android-developers?hl=en > > -- 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