Need to see if your shared folder is taking up space on your dropbox 👨💻? Find out how to check here.
Forum Discussion
gmartins
9 years agoExplorer | Level 3
Android API v2 - Can't build the sdk
Hi there, I'm currently trying to upgrade the sdk to v2, however, I'm struggling with simply building the repository in order to check the examples. I'm running ./gradlew install in the root ...
Qbert
9 years agoExplorer | Level 3
Hi Greg,
thanks again for your support. At the end I managed to update my app with my use case to the v2 Dropbox API.
I have used the methods and classes you mentioned. DbxDownloader and DbxUploader simplify the code quite a lot.
I also managed to load the Dropbox file directly into a String by providing my specialised OutputStream class.
The only remaining issue is that the authentication screen pops up everytime I initiate the Dropbex session. Not the login screen but screen asking to grant Dropbox access to the app. I must have probably misinterpreted the examples provided with respect to the authentication flow. I should check the preferences for the access token before creating the session.
And I am also wondering how to detect errors with startOAuth2Authentication.
Thanks for guiding me through the update process with your responsive, specific and very detailed help!!!
Greg-DB
Dropbox Community Moderator
9 years agoIt sounds like you're calling startOAuth2Authentication every time. You should only call that (or let the user trigger it) when necessary. You can see how the example app checks if it already has a token here.
The startOAuth2Authentication method can throw IllegalStateException, so you can catch that normally.
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!