开发者

Force close the web browser

I have a twitter application which uses Sign-in with twitter. It's 'Settings' screen opens an instance of web browser which goes to twitter, asks the user to authenticate my client application, and comes back to the 'Settings' page after redirection from twitter. Every other thing with twitter and else works fine, except this:

  • After the authentication, when the control has come back into the 'Settings' act开发者_Python百科ivity, the browser instance remains opened.
  • This causes hindrance in the UI experience whenever the user navigates away from the 'Settings' activity by back button, after logging in.
  • Pressing the back button takes the user to the web browser instead of taking her to the activity she was at before coming to 'Settings' activity.

Is there any way to get rid of this? Can I pass any flag with the intent that opens the browser so that the browser knows that it has to close or has not to be there in the view stack of my application? or any other solution?

Thanks!


Is there any chance you can use a WebView instead of starting the browser with an Intent? That way, you have full control over it and can close it whenever you want.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜