How to hide browser when it is about to be shown m

2020-05-08 08:10发布

I am developing a native app that uses OAuth2 for user authentication to a web app. When user asks for authentication, the system browser starts via Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(myLinkHere)), the login page is displayed, user inserts their username/password and the access_token is returned to the app.

My problem is that when the user has saved their credentials in the browser and an authentication request comes about, then the browser starts momentarily and the flow returns to the app right away. Is there any way to hide from the user the opening of the browser or to open it in background so as to avoid this bad user experience?

0条回答
登录 后发表回答