cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Should we modify the Sharing experience to reduce the steps it takes to share files and folders? Tell us your thoughts right here.

Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
1
Ask
2
Reply and help

Authorization web page not redirecting back to my app in Android

Re: Authorization web page not redirecting back to my app in Android

Drageniix
Explorer | Level 4
Just wanted to report the same issue using the SDK, redirect uri is in place for a different activity separate from the AuthActivity just in case but still nothing. Tried on emulators and nougat devices.

Re: Authorization web page not redirecting back to my app in Android

TimB-Dev
Helpful | 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.

Re: Authorization web page not redirecting back to my app in Android

Greg-DB
Dropboxer

Thanks! I'm glad to hear you were able to track that down.

 

@Drageniix If you're still seeing this, can you try that as well?

Re: Authorization web page not redirecting back to my app in Android

Drageniix
Explorer | Level 4
Can confirm this fixes the issue, thanks Tim!

Re: Authorization web page not redirecting back to my app in Android

Rishi
Explorer | Level 4

Can you please elabourate. How to set this attribute and exactly where.

Re: Authorization web page not redirecting back to my app in Android

Greg-DB
Dropboxer

@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:

 

https://github.com/dropbox/dropbox-sdk-java/blob/master/examples/android/src/main/AndroidManifest.xm...

 

The Android documentation for these can be found here:

 

https://developer.android.com/guide/topics/manifest/activity-element

Re: Authorization web page not redirecting back to my app in Android

Rishi
Explorer | 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.

Re: Authorization web page not redirecting back to my app in Android

Greg-DB
Dropboxer

@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! 

Re: Authorization web page not redirecting back to my app in Android

Rishi
Explorer | Level 4

@Greg-DB yes, Sample android application is working fine and getting redirected to original app. but I have copied each file in my application, It is not happening. allow is not redirecting from my chrome browser to my application.

Re: Authorization web page not redirecting back to my app in Android

Greg-DB
Dropboxer

@Rishi Since the sample application works, it sounds like there's something about how your app is set up that is causing this. 

 

So that we can reproduce it and look into it, can you make and share a test project that shows this issue? Thanks in advance! 

Who's talking

Top contributors to this post

  • User avatar
    Greg-DB Dropboxer
  • User avatar
    Himalaya10 New member | Level 2
  • User avatar
    Rishi Explorer | Level 4
What do Dropbox user levels mean?
Need more support?