cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Want to learn some quick and useful tips to make your day easier? Check out how Calvin uses Replay to get feedback from other teams at Dropbox 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: 

Re: how can I use this in my android app [https://github.com/dropbox/dropbox-sdk-java]

how can I use this in my android app [https://github.com/dropbox/dropbox-sdk-java]

ListeurDev
Explorer | Level 4
Go to solution

Hey everyone,

I am very new and trying to develop an app that will automatically connect to my dropbox account and dowload 10 or more pictures from a specified folder.

I have seach all over the internet and could not find a step by step tutorial to help me perform this.

I have found this github api, however I am totally new and do no know how I can use this in my android project.

Could someone please assist with a detailled tutorial?

 

Thank you

1 Accepted Solution

Accepted Solutions

Greg-DB
Dropbox Staff
Go to solution

To use the Dropbox API v2 in Android, you should use the API v2 Java SDK:

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

There isn't a step by step tutorial for that in particular, but there's an example Android app that uses it included with the SDK:

https://github.com/dropbox/dropbox-sdk-java/tree/master/examples/android

You should refer to that as an example of how to implement the app authorization flow, which is accomplished via OAuth 2.

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...

To download files, you can use the download method as shown here:

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

 

View solution in original post

2 Replies 2

Greg-DB
Dropbox Staff
Go to solution

To use the Dropbox API v2 in Android, you should use the API v2 Java SDK:

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

There isn't a step by step tutorial for that in particular, but there's an example Android app that uses it included with the SDK:

https://github.com/dropbox/dropbox-sdk-java/tree/master/examples/android

You should refer to that as an example of how to implement the app authorization flow, which is accomplished via OAuth 2.

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...

To download files, you can use the download method as shown here:

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

 

ListeurDev
Explorer | Level 4
Go to solution

Thank you so much Greg.

Need more support?