I have an application that needs to have a user visit a web page to
authorize it.  After spending time in the Browser the user should
return the my application.

Currently, I'm launching the Browser with:

Intent i = new Intent(Intent.ACTION_VIEW, Uri.parse(url.toString()));
i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(i);

After using the browser, I can go back home and launch my application,
which stacks a new Activity on top of the previous stack of Activities
that were being used in the application. For example. If the user
launches the app, they have Activity A in the stack. From there we
navigate to Activity B which then launches the Browser. Then, the next
time we enter the app, we launch Activity A, which is pushed onto the
stack that already contains an A and B.

My question is then, how can I just go back to the previous stack?
Basically, do I have to create a new Activity? Is there a better way
to launch the Browser, and then come back to my application?

Also, I've been using the Intent.FLAG_ACTIVITY_NEW_TASK when I start
the Browser activity so that my app stays running. Is this a good way
to go about solving this problem?

Thanks in advance, any help is greatly appreciated,

- Chris

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to