[android-developers] Re: onPause not being followed by onStop and onDestroy...

2010-10-10 Thread Indicator Veritatis
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).

[android-developers] Re: onPause not being followed by onStop and onDestroy...

2010-10-07 Thread sdphil
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

Re: [android-developers] Re: onPause not being followed by onStop and onDestroy...

2010-10-07 Thread Kostya Vasilyev
See here: http://developer.android.com/reference/android/app/Activity.html#ActivityLifecycle onPause is guaranteed to be called, but onStop/onDestroy is not. If Android needs memory after your activity has been paused, it may kill your process. This happens without invoking any callbacks.

[android-developers] Re: onPause not being followed by onStop and onDestroy...

2010-10-07 Thread sdphil
okay, if the system decides to kill your activity, it won't call it. but what i'm seeing is really weird. I have an activity stack A, B (with B being on top / visible). When I hit back on B, i get to activity A, but onStop is never called. Now, when I hit back on A, I go back to the home

Re: [android-developers] Re: onPause not being followed by onStop and onDestroy...

2010-10-07 Thread Kostya Vasilyev
Are you careful about calling superclass methods in all your onStart / onStop / onPause / onResume? -- Kostya 07.10.2010 19:15, sdphil пишет: okay, if the system decides to kill your activity, it won't call it. but what i'm seeing is really weird. I have an activity stack A, B (with B being