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 <treking...@gmail.com> wrote: > On Fri, Sep 16, 2011 at 1:37 PM, Shri <shri.bo...@gmail.com> 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 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 -- 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