Search code examples
androidauthenticationdropboxdropbox-api

Dropbox AuthActivity from Android. Fails with "User may have restricted profile"


I'm trying to modify an existing app (that uses Gdrive) to work with Dropbox. To that effect, I'm adapting code from https://github.com/dropbox/dropbox-sdk-java/tree/master/examples/android.

Unfortunately, I'm stuck at the first step: Auth.startOAuth2Authentication

Android Studio's log shows the following:

08-02 13:13:30.338 7994-7994/rudy.android.stdb E/com.dropbox.core.android.AuthActivity: Could not launch intent. User may have restricted profile
android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.intent.action.VIEW dat=https://www.dropbox.com/... }

Any ideas?


Solution

  • This error seems to be indicating that there is no app available to handle this intent to view the supplied URL, i.e., there is no browser installed. It sounds like this may be due to the use of a Restricted Profile.

    If there isn't a browser or the Dropbox app available, the SDK won't be able to process the authorization flow. If this is the issue, you should enable a browser or switch off of the Restricted Profile.

    [Cross-linking for reference: https://www.dropboxforum.com/t5/API-Support-Feedback/Auth-startOAuth2Authentication-Android-returns-quot-User-may/m-p/288600 ]