You probably can't avoid this.  The browser is somewhat special in its
implementation, and doesn't even go on your back stack.  (It is singleTask.)

One thing you could try, if activity B and C are your own, if you give them
the same taskAffinity then you could maybe set it up so the launch of C
causes or task with A/B to come to the foreground and place C on top.

Or just not try to stick the browser in the middle of your task like that,
and instead implement your own activity to display a web page with WebView.

On Sun, Sep 12, 2010 at 11:51 PM, Arpit <[email protected]> wrote:

> I have the a scenario where number of Activites are invoked:
>
> Activity A --> Activity B --> Browser Activity --> Activity C...
>
> By Browser Activity I mean, Activity B will do the following:
>
> String url = "http://example.com";;
> startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(url)));
>
> On Activity C , when user clicks the back button, it always returns to
> the Browser Activity. I do not want this to happen...
>
> I understand that each time one Activity calls another, the caller
> activity goes onto a stack?? Is it possible to restrict it going onto
> the stack, so that when user press back button on Activity C, it goes
> to Activity B, skipping the Browser Activity?
>
> Please help!!!
>
> Regards,
> Arpit
>
> --
> 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]<android-developers%[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

Reply via email to