0
votes

I have downloaded the Dropbox Sync API Android. I am using it to develop an application. My problem is that the first time when i install /run the apk file it requires an external authentication with the Dropbox account (either through dropbox app or website).

I was wondering, can we achieve so that the first time authentication process of Dropbox Sync API with the Dropbox account is not done externally (through dropbox app or website) but within application.

I see that the access tokens are precisely for that thing but i don't see any features for access tokens at Dropbox SYNC API.

Is it possible to achieve the authentication within the application, if yes how can we do it?

1

1 Answers

0
votes

The Dropbox Android Sync SDK doesn't currently offer the ability to direct where the app authorization occurs. It will automatically use whatever means the user has. That is, it will use the Dropbox app, if installed, or the web browser if not. We're tracking explicit control over this as a feature request though.

Once the app receives an access token for the user, the SDK automatically stores it for you so that you don't have to prompt the user to re-authorize the app. The SDK doesn't expose a way to retrieve the access token, but that generally shouldn't be necessary as it does the storage and loading of the access token for you. The tutorial covers this here:

https://www.dropbox.com/developers/sync/start/android#linking-accounts