Android Question How to use System Browser instead of webview for Dropbox Authentication

Turbo3

Active Member
Licensed User
Longtime User
I was just told by Dropbox support that I need to change my Dropbox API 2 Authentication code to use the System Browser instead of a webview to put up the Authentication web page. This is to comply with Google's sign in policy.

Anyone have samples of how that would be done?

Here is the exact text of their note.

"Thanks for sending this in! One note, it appears your app currently processes the OAuth app authorization flow inside a web view, instead of the system browser. In order to support the Google Sign In flow when signing in to authorize the Dropbox app, your app will need to be updated to use the system browser, in order to comply with Google's policy:

https://developers.googleblog.com/2016/08/modernizing-oauth-interactions-in-native-apps.html"
 
Last edited:

Turbo3

Active Member
Licensed User
Longtime User
Ok, that gets me the system web browser and the Dropbox login and authorization pages. But then Dropbox tries to return the authorization token to the system browser in the form of 127.0.0.1/#access_token=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx. The browser then has this message "This site can't be reached 127.0.0.1 refused to connect".

How do I get the system browser to return the token url back to my app which is how it works with webview?

Somehow I need to let the System Browser know to send the 127.0.0.1 url to my app. How is that done?
 
Last edited:
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
Upvote 0

Turbo3

Active Member
Licensed User
Longtime User
So you are saying you don't use Webview in
Activity.LoadLayout("OAuth") but are bring up the System Browser to get the access token? If yes why do you need to Load a Layout?
 
Upvote 0

Turbo3

Active Member
Licensed User
Longtime User
So you are using the System Browser to get the access token? That is what I really wanted to know.

Looks like I just need DbxAuth. Is that available by itself?

==============================
Never mine I found my answer. The Java version does not use web view.
 
Last edited:
Upvote 0
Top