If you want to bring your whole task to the front, build an Intent which is the same thing used to launch it -- ACTION_MAIN, CATEGORY_LAUNCHER, and the component name set to the class if your root activity.
On Fri, Sep 16, 2011 at 3:33 PM, Shri Borde <[email protected]> wrote: > I guess I can create a trampoline Activity which gets launched by clicking > on the notification icon, and it could then start MyActivity using > FLAG_ACTIVITY_REORDER_TO_FRONT. A bit of a pain which PendingIntent would > have supported itself, but I can give this a shot. > > > On Fri, Sep 16, 2011 at 3:22 PM, TreKing <[email protected]> wrote: > >> On Fri, Sep 16, 2011 at 1:37 PM, Shri <[email protected]> wrote: >> >>> However, >>> this does not seem to work even though I set >>> Intent.FLAG_ACTIVITY_REORDER_TO_FRONT - a new instance gets created if >>> MyActivity was not on top of my task's stack. >>> >> >> http://developer.android.com/reference/android/app/PendingIntent.html#getActivity(android.content.Context, >> int, android.content.Intent, int) >> >> "Note that the activity will be started outside of the context of an >> existing activity, so you must use the >> Intent.FLAG_ACTIVITY_NEW_TASK<http://developer.android.com/reference/android/content/Intent.html#FLAG_ACTIVITY_NEW_TASK> >> launch >> flag in the Intent." >> >> It might get set for you if you don't specify it. >> >> >> ------------------------------------------------------------------------------------------------- >> TreKing <http://sites.google.com/site/rezmobileapps/treking> - Chicago >> transit tracking app for Android-powered devices >> >> -- >> 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 > > > -- > 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 > -- 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

