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: 

Dropbox android API.Want to show my photos to users of my android application.

Dropbox android API.Want to show my photos to users of my android application.

hjoshi15
New member | Level 2

I want to show photos stored on my drop box to all the users of my android app,I know that I have to use the acess token,app key and app secret for that but there is very little documentation about dropbox api v2 as v1 is deprecated.I am not able to get the source code for this,kindly help and provide necessary details for implementation of my application.I am new to dropbox so pls help!

1 Reply 1

Greg-DB
Dropbox Staff

For 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

 

Your AndroidManifest.xml should be set up as shown here:

 

https://github.com/dropbox/dropbox-sdk-java/blob/master/examples/android/src/main/AndroidManifest.xm...

 

You start the flow by calling startOAuth2Authentication as shown here:

 

https://github.com/dropbox/dropbox-sdk-java/blob/master/examples/android/src/main/java/com/dropbox/c...

 

You complete the flow by calling getOAuth2Token as shown here:

 

https://github.com/dropbox/dropbox-sdk-java/blob/master/examples/android/src/main/java/com/dropbox/c...

 

Your app can store and re-use the resulting access token for that user, as the example does here:

 

https://github.com/dropbox/dropbox-sdk-java/blob/master/examples/android/src/main/java/com/dropbox/c...

 

Once you have an access token, you can make a client as shown here:

 

https://github.com/dropbox/dropbox-sdk-java/blob/395d463840778b4c6ec730aef82b0a9dbee10f8e/examples/a...

 

With a client, you can make whatever calls you want, as shown in the readme and examples:

 

https://github.com/dropbox/dropbox-sdk-java/blob/master/ReadMe.md#try-some-api-requests

 

For instance, to download a file:

 

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

 

The full documentation for the SDK itself can be found here:

 

https://dropbox.github.io/dropbox-sdk-java/api-docs/v3.0.x/

 

Hope this helps! 

 

Need more support?
Who's talking

Top contributors to this post

  • User avatar
    Greg-DB Dropbox Staff
What do Dropbox user levels mean?