We’re Still Here to Help (Even Over the Holidays!) - find out more here.
Forum Discussion
TimB-Dev
9 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 wo...
Greg-DB
Dropbox Community Moderator
9 years agoThanks! We'll work on debugging this with the build.
TimB-Dev
9 years agoHelpful | Level 5
Just to follow up... Setting the taskAffinity property in the manifest for the dropbox AuthActivity seemed to fix the problem. The oauth flow is now able to relaunch our app. I also set excludeFromRecents to true which cleared up another issue but could be involved here as well.
- Drageniix9 years agoExplorer | Level 4Can confirm this fixes the issue, thanks Tim!
- Rishi8 years agoExplorer | Level 4
Can you please elabourate. How to set this attribute and exactly where.
- Greg-DB8 years ago
Dropbox Community Moderator
Rishi I believe they were referring to setting 'taskAffinity' and/or 'excludeFromRecents' for the 'com.dropbox.core.android.AuthActivity' in the app's AndroidManifest.xml, e.g., here in the sample:
The Android documentation for these can be found here:
https://developer.android.com/guide/topics/manifest/activity-element
- Rishi8 years agoExplorer | Level 4
Greg-DB@Greg K. I am glad that you responded. I tried both attributes but it did not helped me. I copied everything from example to my application. And problem is still not resolved.
When I am clicking on manual back after clicking on allow, app does have a token and it is fetching all the files. But I want browser to redirect to my application automatically after clicking allow button.
Please help me. I am stucked on this since 2 days. - Greg-DB8 years ago
Dropbox Community Moderator
Rishi First, for reference, does the redirect work in the Android sample app itself for you?
If so, can you provide your own test project that reproduces this issue so we can reproduce it here and investigate? Thanks in advance!
About 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!