Well, we're going right back to the basic fundamentals here! I thought
I had got to grips with this long ago, but clearly not. Here's what's
happening:

If I press the 'home' key, onPause and onStop are called.
If I press the 'back' key, in addition onDestroy is called (that's the
behaviour that has confused me).
If I restart the activity by 'long pressing' the home key, onStart and
onResume are called.
If I restart the activity from the app menu, it is entirely restarted
with onCreate, leaving the other instance of the same activity in the
background. (Again, this is the behaviour that has confused me).

So... is there a way to ensure that only one instance of the activity
can be run, so that when (and however) I start it, if it's already
running that is the one that continues?

On Dec 11, 3:57 pm, "Mark Murphy" <[email protected]> wrote:

> If your initializers are getting invoked again, then you were not paused
> and resumed, but rather destroyed and recreated. In that case, you should
> have unbound from the service in onDestroy().

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