You can't really do this, the standard browser is set as singleTask, which means it will always be a separate item and show as a recent task. Any games you play trying to stop it from behaving like this are either not going to work or break things elsewhere.
On Fri, Apr 8, 2011 at 11:57 PM, Tomas Prochazka <[email protected]>wrote: > I want use system browser for Twitter/Foursquare OAuth authorization. > I think that this is safer then open browser in Webview directly in my > app. System browser also can remember user password and he can't enter > it again and again. > > My idea is open the browser via standard intent > > Intent browserIntent = new Intent(Intent.ACTION_VIEW, > Uri.parse(authUrl)); > browserIntent.addFlags(Intent.FLAG_ACTIVITY_NO_HISTORY); > startActivity(browserIntent); > > And via call back URL myApp://twitter call back my app activity. > Better will be call some special URL which Android will handle like > close browser or goto back to the application which opened it. > > But big problem is that this work only if browser was not running > before. If browser is running already it keep in history and user > after OAuth authorization stay in the browser instead of my app. > > I think that this is caused because browser is running in different > task and FLAG_ACTIVITY_NO_HISTORY works only for activities in one > task. > > But how to solve it. I think that this is very common problem. > Is only way to use internal Webview? :-( > > Similar question is here but without real solution: > > > http://stackoverflow.com/questions/5326538/how-can-i-do-that-in-android-activity-webbrowser-acrivity-but-press-back/5598405#5598405 > > -- > 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 > -- 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

