I have an Activity which is launched from a Service. This Activity can
spawn other children Activities.

Now under certain conditions (particularly related to using screen
lock), I can end up with the Service starting a second copy of the
Activity again.

For reasons of performance, the Service is being started and stopped
at various times, and cannot be relied on to hold state.

What is the best way to prevent this second launch?
Can I (for example) detect that the Activity is already running in the
stack and do finish()?

This feels like it should be straight forward - perhaps I'm being
thick - forgive me.

Thanks for any help

Ian Hunter

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

Reply via email to