Are you sure having a notification re-order the backstack like that is
a good idea? My understanding is:

I open garden A
I open garden B   (pressing back gets me to A)
I open garden C
I put the phone to sleep. At some point a notification appears. I
press it.
The notification opens garden A.
Now I expect pressing back to return me to garden C, then B, then A
again. Not C, then B, then the home screen or whatever.



On May 28, 11:00 pm, Tom Gibara <[email protected]> wrote:
> I'm working to finish a small application, but I'm having problems seeing
> what combination of activity attributes and intent flags I need to achieve
> my intended application design. Trying my best not to describe the app in
> minute detail, here's the basic operation (I've supplied screenshots in the
> hope it makes sense easily):
> Users have a garden which contains flowers (GardenActivity).
>
> http://www.tomgibara.com/images/daisy/garden/hut_screen.jpg
>
> They can tap on a garden to see details of flowers (FlowerActivity)
>
> http://www.tomgibara.com/images/daisy/garden/flower_screen.jpg
>
> When flowers are fully grown a notification provided, tapping on the
> notification displays the garden containing the flower.
>
> http://www.tomgibara.com/images/daisy/garden/notify_screen.jpg
>
> Users can also use the GardenActivity as a picker to choose flowers to
> "exhibit" (ConfigureActivity)
>
> http://www.tomgibara.com/images/daisy/garden/planting_screen.jpg
>
> I want the app to operate so that if the user already has a GardenActivity
> somewhere in the stack (whether it's at the top, or underneath a
> FlowerActivity) the notification will alert the user by bringing that
> activity to the front (clearing any FlowerActivity that may be above it).
> I've tried using the FLAG_ACTIVITY_NEW_TASK | FLAG_ACTIVITY_CLEAR_TOP
> combination (without changing any activity launch modes) on the
> notification's pending intent, but it still launches a new GardenActivity,
> even if one is already available.
>
> I've also tried using android:launchMode="singleTask" on GardenActivity. The
> notifications then seem to work correctly, but it prevents GardenActivity
> from returning any result back to ConfigureActivity.
>
> Any help appreciated, I'm stumped by this at the moment.
>
> Tom.
--~--~---------~--~----~------------~-------~--~----~
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