"A situation you will often run in to is when another entity (such as
the SearchManager or NotificationManager) starts one of your
activities. In this case, the Intent.FLAG_ACTIVITY_NEW_TASK flag must
be used, because the activity is being started outside of a task (and
the application/task may not even exist). As described previously, the
standard behavior in this situation is to bring to the foreground the
current task matching the new activity's affinity and start the new
activity at the top of it. There are, however, other types of behavior
that you can implement.

One common approach is to also use the Intent.FLAG_ACTIVITY_CLEAR_TOP
flag in conjunction with NEW_TASK. By doing so, if your task is
already running, then it will be brought to the foreground, all of the
activities on its stack cleared except the root activity, and the root
activity's onNewIntent(Intent) called with the Intent being started.
Note that the activity often also use the singleTop or singleTask
launch mode when using this approach, so that the current instance is
given the new intent instead of requiring that it be destroyed and a
new instance started."

from http://code.google.com/android/intro/appmodel.html

On Sep 29, 4:03 am, Gil <[EMAIL PROTECTED]> wrote:
> Awesome! You saved the day ... again.
--~--~---------~--~----~------------~-------~--~----~
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