How to hide browser when it is about to be shown momentarily - Android

帅比萌擦擦* 提交于 2019-12-20 05:45:27

问题


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?

来源:https://stackoverflow.com/questions/30301170/how-to-hide-browser-when-it-is-about-to-be-shown-momentarily-android

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!