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

MarioEM's avatar
MarioEM
Helpful | Level 6
8 years ago

simple Android example for APIv2 required

I have implemented an Android code for Downloading / Uploading files to Dropbox App folder based on the old, simple DBRoulette example, which works perfectly well under Dropbox APIv1.   I have spen...
  • MarioEM's avatar
    MarioEM
    8 years ago

    Hello Greg,

    That was a good suggestion with the link that included the appropriate tip!

    I already had the correct Write and Read permissions in the AndroidManifest, but I forgot about the new Android rule introduced since version 23 that requires app users to manually accept the external write storage permission.

    It is all working well now, both file Upload and Download.

    Thanks for your help.

    I had to modify the example Download code to obtain the required metadata for the specific Dropbox file:

        protected FileMetadata doInBackground(String... params) {
            String fileName = params[0];
    
            try {
                FileMetadata metadata = (FileMetadata) mDbxClient.files().getMetadata("/" + fileName);
    

    Please comment if the above code is the correct way to do it. 

About Dropbox API Support & Feedback

Node avatar for Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

5,912 PostsLatest Activity: 2 months ago
333 Following

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