We're making changes to the Community, so you may have received some notifications - thanks for your patience and welcome back. Learn more here.
Forum Discussion
Dolphin_2018
7 years agoExplorer | Level 4
Where can I find Full Simple DropBox example to download ?
Hi all,
I'm looking for a simple DropBox example project that I can just download as a Zip file and then compile in my Android Studio and run on my Nexus 5 (Android) device. I need a simple project that send one Jpg file from my device to my Dropbox.
Can you please give my a link to such example? There are many code examples, But as I said I want a project that can just compile and run right away (I have my App_Key & Secret_Key, I will insert them into the code before compile).
Thanks.
- You can clone or download the repo here:
https://github.com/dropbox/dropbox-sdk-java
There are instructions for running the Android sample, included with the repo clone or download at /examples/android, here:
https://github.com/dropbox/dropbox-sdk-java/tree/master/examples/android
If you attempt to make any API v1 calls, they will fail with `v1_retired`. The Android sample app only uses API v2, via DbxClientV2:
https://github.com/dropbox/dropbox-sdk-java/blob/master/examples/android/src/main/java/com/dropbox/core/examples/android/DropboxClientFactory.java#L21
- Greg-DBDropbox StaffFor Android, we recommend using the official Dropbox API v2 Java SDK:
https://github.com/dropbox/dropbox-sdk-java
There's an example Android app here:
https://github.com/dropbox/dropbox-sdk-java/tree/master/examples/android
We don't have a simpler example than that for Android, but you can see how it performs an upload here:
https://github.com/dropbox/dropbox-sdk-java/blob/master/examples/android/src/main/java/com/dropbox/core/examples/android/UploadFileTask.java#L62- Dolphin_2018Explorer | Level 4
Thanks, but it's not clear to me, how do I download and compile/build the example project at your second link? (Android app example) I don't see any download link for the whole project, should I download the files one by one? It doesn't looks so logic.
Another question, as I understand your old API v1 is not supported anymore and I need to use API v2 in my application in order to use the DropBox:
https://blogs.dropbox.com/developers/2017/09/api-v1-shutdown-details/
How do I determine if my application use API v1 or API v2?
Where do I see that?
Thanks.
- Greg-DBDropbox StaffYou can clone or download the repo here:
https://github.com/dropbox/dropbox-sdk-java
There are instructions for running the Android sample, included with the repo clone or download at /examples/android, here:
https://github.com/dropbox/dropbox-sdk-java/tree/master/examples/android
If you attempt to make any API v1 calls, they will fail with `v1_retired`. The Android sample app only uses API v2, via DbxClientV2:
https://github.com/dropbox/dropbox-sdk-java/blob/master/examples/android/src/main/java/com/dropbox/core/examples/android/DropboxClientFactory.java#L21
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
5,875 PostsLatest Activity: 26 minutes agoIf 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!