Forum Discussion

T3chDad's avatar
T3chDad
Helpful | Level 6
9 years ago
Solved

Android app fails authentication if Dropbox app isn't installed...

Dropbox API/SDK 3.0.5 Android target 19   After verifying there is no saved access token, I'm kicking off the authentication flow with: Auth.startOAuth2Authentication(getApplicationContext(),...
  • T3chDad's avatar
    T3chDad
    9 years ago

    Alright...I figured it out.  Silly me.  I had two Dropbox activity declarations in my manifest.  I had the "old" original entry with my production app key (from v1 days) and I had the new v2 api entry with a different app key that I use for testing.  Once I removed the old activity entry and changed the key on the new activity entry, everything worked properly.  My Dropbox activities in my manifest as they were before the fix are below for reference.

    <!-- Old v1 Activity -->
    <activity android:name="com.dropbox.client2.android.AuthActivity" android:launchMode="singleTask" android:configChanges="orientation|keyboard"> <intent-filter> <!-- Change this to be db- followed by your app key --> <data android:scheme="db-xxxxxxxxxx(CorrectKey)" /> <action android:name="android.intent.action.VIEW" /> <category android:name="android.intent.category.BROWSABLE"/> <category android:name="android.intent.category.DEFAULT" /> </intent-filter> </activity>
    <!--New v2 Activity --> <activity android:name="com.dropbox.core.android.AuthActivity" android:configChanges="orientation|keyboard" android:launchMode="singleTask"> <intent-filter> <!-- Change this to be db- followed by your app key --> <data android:scheme="db-yyyyyyyyyyyyy(WrongKey)" /> <action android:name="android.intent.action.VIEW" /> <category android:name="android.intent.category.BROWSABLE" /> <category android:name="android.intent.category.DEFAULT" /> </intent-filter> </activity>

    Thanks for your help and patience in getting me pointed in the right direction.

     

     

     

About Dropbox API Support & Feedback

Node avatar for Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.

The Dropbox Community team is active from Monday to Friday. We try to respond to you as soon as we can, usually within 2 hours.

If you need more help you can view your support options (expected response time for an email or ticket is 24 hours), or contact us on X, Facebook or Instagram.

For more info on available support options for your Dropbox plan, see this article.

If you found the answer to your question in this Community thread, please 'like' the post to say thanks and to let us know it was useful!