You might see that the Dropbox Community team have been busy working on some major updates to the Community itself! So, here is some info on what’s changed, what’s staying the same and what you can expect from the Dropbox Community overall.
Forum Discussion
TimB-Dev
8 years agoHelpful | Level 5
Authorization web page not redirecting back to my app in Android
In our Android app, I am having an issue where the dropbox.com authorize web page does not redirect back to our app when the user clicks the Allow button. I wrote a sample app and the OAuth2 flow works fine with that app on the same device\environment.
The first time you click the Allow button once the page displays, the page seems to refresh in Chrome. It seems like it's redirecting back to itself. The app does show up as connected to the account when I look in Settings for the user on dropbox.com. So that part of the auth flow is working - it's just not redirecting to the app.
I added the AuthActivity to the manifest...
<activity
android:name="com.dropbox.core.android.AuthActivity"
android:configChanges="orientation|keyboard"
android:launchMode="singleTask">
<intent-filter>
<!-- Insert your app key after “db- ...” -->
<data android:scheme="db-xxxxxxx" />
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.BROWSABLE" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
And I am calling Auth.startOAuth2Authentication() here...
public void authenticateNewDropbox(Activity con) //++ Added con param
{
// Set bool so we know on Resume that we're logging into Dropbox
mIsDropboxLogin = true;
//Kick off auth2 flow: this launches the browser, and then back to us in OnResume() in the Activity
Auth.startOAuth2Authentication(con, con.getResources().getString(R.string.APP_KEY));
}
The app was previously doing OAuth2 with the v1 SDK and it worked fine. I've tried a new AppID as well. I don't see any relevant messages in the Android Monitor in Android Studio.
Been stuck on this for a couple days and I can't understand what I'm doing wrong. Thanks for any help.
- Greg-DBDropbox Staff
Thanks for the report! I'm not aware of anything that should cause this, so we'll have to investigate.
It will be difficult since this doesn't reproduce in a sample app, so to begin, some additional information would be helpful:
- what version number of the SDK do you have installed?
- what Android version(s) are you seeing this with?
- have you tested this on multiple devices or emulators? Do they all display the same issue?- TimB-DevHelpful | Level 5
Dropbox sdk 3.0.3. Same behavior on both a 7.1.1 and a 6.0.1 device.
- Greg-DBDropbox StaffThanks! Unfortunately I don't see anything out of the ordinary here. A few ideas next:
- It might be useful to see if there are any errors coming up in the JavaScript console, e.g., using Chrome remote debugging: https://developers.google.com/web/tools/chrome-devtools/remote-debugging/
- Also, can you try it in a non-Chrome browser?
- If you want, share a build that produces the issue with us and we'll try to troubleshoot it here: https://www.dropbox.com/developers/contact
- Himalaya10New member | Level 2
I have the same issue with my ASP.NET Mvc web app, can somebody help.
- Greg-DBDropbox Staff
Himalaya10 This is an old thread regarding this issue on a different platform, so please open a new thread with the details of the issue you're seeing so we can help you specifically. Thanks!
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
5,915 PostsLatest Activity: 2 days agoIf 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 or Facebook.
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!