Your workflow is unique 👨💻 - tell us how you use Dropbox here.
Forum Discussion
Gigasnike95
8 years agoNew member | Level 2
Example code for download/upload file in Android
Someone could share a functional code to download or upload a file on Android? Thank you
Greg-DB
Dropbox Community Moderator
8 years agoIf 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/android/src/main/java/com/dropbox/core/examples/android/DownloadFileTask.java
And for uploading a file here:
https://github.com/dropbox/dropbox-sdk-java/blob/7ecc15cf0f51d6ae2ba5cdb334aac2c2f3474b87/examples/android/src/main/java/com/dropbox/core/examples/android/UploadFileTask.java
https://github.com/dropbox/dropbox-sdk-java/blob/7ecc15cf0f51d6ae2ba5cdb334aac2c2f3474b87/examples/android/src/main/java/com/dropbox/core/examples/android/DownloadFileTask.java
And for uploading a file here:
https://github.com/dropbox/dropbox-sdk-java/blob/7ecc15cf0f51d6ae2ba5cdb334aac2c2f3474b87/examples/android/src/main/java/com/dropbox/core/examples/android/UploadFileTask.java
SnowJeb
8 years agoExplorer | 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-DB8 years ago
Dropbox Community Moderator
SnowJeb The example should work. Can you share the specific errors you're getting so we can help? Thanks in advance!
- emna157 years agoNew member | Level 2
hey i'm trying to create file by code in android studion then upload it to dropbox any help ?
- Greg-DB7 years ago
Dropbox Community Moderator
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:
About Dropbox API Support and Feedback
Get help with the Dropbox API from fellow developers and experts.
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!