Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
Hi all. I'm new to the DropBox SDK so please forgive if I ask a question that has been asked many times. I did do a search on the site but could not find anything like what I'm attempting to do.
I want to store a directory of photos (PNGs) on a DropBox folder. I'm writing an Android app using Android Studio (Gradle) that contains an activity that will be a photo gallery. When the activity loads, I want the app to connect to the DropBox folder and copy the files to the app's 'drawable' folder. The app will then build the photo gallery on the fly based on those photos. The SDK for Java seems to be somewhat out of date as the sample code for connecting to DropBox contains a method that is deprecated.
I've written the code to ennumerate through the drawable folder and build the photo gallery. All I need is an example of where you use Java to connect to a folder in DropBox and copies (transfers) the files in that folder to the app. Or even more simply, if I could see an example where you use Java to connect to the DropBox folder and make a list of the files in that folder - that would work. I can probably figure out how to copy the files to the app myself.
Thanks in advance for your time and assistance!
The page at https://www.dropbox.com/developers/documentation/java links to Github. On that page (https://github.com/dropbox/dropbox-sdk-java) in the 'Link an account' section you see the code example given for the version 2 API. Specifically, the main method contains this line:
DbxRequestConfig config = new DbxRequestConfig("dropbox/java-tutorial", "en_US");
In Android Studio, DbxRequestConfig is flagged as deprecated.
Someone also posted about this issue on Stack Overflow (https://stackoverflow.com/questions/47302711/dbxrequestconfig-is-deprecated-in-api-v2)
Thanks for linking the examples!
Hi there!
If you need more help you can view your support options (expected response time for a 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!