Hi

For my application, I only ever want a single instance to run and I
only ever want a single instance to exist of my main activity class.
If the user navigates away from my app (e.g. by pressing the home key)
then if it hasn't been destroyed by the system I'd like the user to go
back to the same instance when they click on the application from the
homescreen.

I read the app fundementals section (several times!) and I think this
means I should specify singleTask.

However - in practise everything seems to work in the way I want just
using the default settings (standard mode). If I leave the application
(e.g. on a settings menu in a sub activity) then when I click back on
the application from the homescreen I go back to the activity I left.

I assume that this is because when you launch an app from the
homescreen the system is using the FLAG_ACTIVITY_NEW_TASK flag,
causing it to reattach to my existing instance?

So - my question is, why is singleTask needed? I can't see any way
that users could end up with two instances of a standard mode
application running anyway?

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