You use the same intent that original started the task.  Tasks started from
launcher are ACTION_MAIN, CATEGORY_LAUNCHER, with the component being the
explicit component corresponding to the icon it has shown.

You can use "adb shell dumpsys activity" to see details on the intents used
to launch each acitivity and task.

On Fri, Mar 26, 2010 at 4:30 PM, westmeadboy <[email protected]>wrote:

> If my app is already running, then either Activity1 or Activity2 might
> be currently on top.
>
> How to construct an Intent so that it will simply show whichever
> Activity is already on top (in the task)? Just like if you touch an
> icon in the Recent list (long-press home).
>
> At the moment, it looks like (for explicit Intents) you need to be
> explicit about the Activity to launch. But I would rather be explicit
> about the app (package name).
>
> FWIW, I'm thinking of Intents triggered via Notifications.
>
> --
> 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]<android-developers%[email protected]>
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>
> To unsubscribe from this group, send email to android-developers+
> unsubscribegooglegroups.com or reply to this email with the words "REMOVE
> ME" as the subject.
>



-- 
Dianne Hackborn
Android framework engineer
[email protected]

Note: please don't send private questions to me, as I don't have time to
provide private support, and so won't reply to such e-mails.  All such
questions should be posted on public forums, where I and others can see and
answer them.

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

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words "REMOVE ME" as the subject.

Reply via email to