Question

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' activity, 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!

Was it helpful?

Solution

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top