Hi, I have an hypothetical app that has two activities: A (List), B (Details). A can be launched and can itself launch B. I also have a widget that can also launch B via the use of an PendingIntent. Activity B looks at the Intent's extras ie1 and ie2 when created and shows different data then.
The behavior I would like to see is A launches B. When I press HOME and then go to a widget that itself launches B then the existing B should be replaced by the new B with different extras (ie1 and ie2). The new B should replace the existing B. Also what I am seeing is when I go back HOME after seeing B that was launched with ie1="x" and then launch B from the widget again with ie1="y" I still get to see the old B with ie1="x". It doesn't really matter what configuration/approach I am using now as I am willing to completely change it. But for illustration purposes I'd like to share a couple of things that I use or used. I put all extras additionally into the data uri as parameters, because it seems that the extras alone are not taken into account when comparing Intents. I thought from reading the documentation that launching with category=Intent.CATEGORY_LAUNCHER and flags=Intent.FLAG_ACTIVITY_CLEAR_TOP should do what I expected, but it doesn't. In the declaration of A and B I set clearTaskOnLaunch="true". Anything special to take into account when launching those intents from a PendingActivity associated with a remote view? I found it interesting that when launching out of this context the flags always contained Intent.FLAG_ACTIVITY_NEW_TASK (0x1), even though *I* didn't set it. Instead I set CLEAR_TOP (0x04). Another thing that I would like to know is how could I configure/program it that a launch of B from the widget completely clears the task's stack, basically like clearTaskOnLaunch, but when firing an intent. With all of this what I really like to avoid is that Gmail-like BACK-orgy, where I sometimes have to press BACK five to eight times to reach the home screen. This seems to be the same problem. Opening Gmail from the launcher, from shortcuts and from the new-mail notification does that. Any ideas? -- 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

