cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Back again with another edition of 'How we use Dropbox', so find out how Emma uses to-do lists to get it all done 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

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

Greg-DB
Dropboxer

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! 

 

Poll
We love to learn from the educators who use Dropbox. Whether you teach kids, teens, adults or a combination of all three, we want to know what apps and integrations you use with Dropbox to help with teaching. Which of the ones below is your favorite, or most used tool?
Who's talking

Top contributors to this post

  • User avatar
    Greg-DB Dropboxer
What do Dropbox user levels mean?
Need more support?