Look at the intent flags:

http://developer.android.com/guide/components/tasks-and-back-stack.html

Kris

On Fri, Dec 14, 2012 at 8:17 AM, dashman <[email protected]> wrote:
> My app starts on activity A and can navigate to activity B.
>
> I also have a background service and creates a notification.
>
> Once the user taps on the notification, it calls A and then i create
> a new activity B.
>
> the problem is that if the user taps on the notification after the
> user has navigated from A  to B - it creates a new instance of B.
>
> So I have A B B.
>
> Like to avoid that.
>
> When activity A is activated by the notification tap - is there a way
> I can detect that B is the top activity currently - so that i don't
> create a new instance.
>
> --
> 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

Reply via email to