cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
What’s new: end-to-end encryption, Replay and Dash updates. Find out more about these updates, new features and more 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: 

Example code for download/upload file in Android

Example code for download/upload file in Android

Gigasnike95
New member | Level 2

Someone could share a functional code to download or upload a file on Android?

 

Thank you 

5 Replies 5

Greg-DB
Dropbox Staff
If you're using the Dropbox API v2 Java SDK on Android, you can find a sample for downloading a file here:

https://github.com/dropbox/dropbox-sdk-java/blob/7ecc15cf0f51d6ae2ba5cdb334aac2c2f3474b87/examples/a...

And for uploading a file here:

https://github.com/dropbox/dropbox-sdk-java/blob/7ecc15cf0f51d6ae2ba5cdb334aac2c2f3474b87/examples/a...

SnowJeb
Explorer | Level 3

Hi,

I am trying to migrate from v1 to v2. No luck sofar. And I do not get the example code to work. 

I tried the android axample but it fails on gradle build. So no way tot test pieces of code.

 

Trying the turorial (in androidstudio):

https://github.com/dropbox/dropbox-sdk-java#dropbox-for-java-tutorial

I run into errors as well. Here:

FullAccount account = client.users().getCurrentAccount();

 

I am desperate! Does anyone have a working Simple example to connect to dropbox and upload a file with android studio?

 

thanks a lot!!

 

 

 

Greg-DB
Dropbox Staff

@SnowJeb The example should work. Can you share the specific errors you're getting so we can help? Thanks in advance! 

emna15
New member | Level 2

hey i'm trying to create file by code in android studion then upload it to dropbox any help ?

Greg-DB
Dropbox Staff

@emna15 For using the Dropbox API in Android, you should use the Dropbox API v2 Java SDK:

 

https://github.com/dropbox/dropbox-sdk-java

 

There's an example of uploading files here:

 

https://github.com/dropbox/dropbox-sdk-java/blob/7ecc15cf0f51d6ae2ba5cdb334aac2c2f3474b87/examples/a...

Need more support?
Who's talking

Top contributors to this post

  • User avatar
    Greg-DB Dropbox Staff
  • User avatar
    emna15 New member | Level 2
  • User avatar
    SnowJeb Explorer | Level 3
What do Dropbox user levels mean?