You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: ReadMe.md
+9-11Lines changed: 9 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,12 +1,10 @@
1
1
# Dropbox Core SDK for Java 6+
2
2
3
-
A Java library to access [Dropbox's HTTP-based Core API](https://www.dropbox.com/developers/core/docs).
3
+
A Java library to access [Dropbox's HTTP-based Core API v2](https://www.dropbox.com/developers/documentation/http#documentation). This SDK also supports the older [Core API v1](https://www.dropbox.com/developers-v1/core/docs), but that support will be removed at some point.
4
4
5
5
License: [MIT](License.txt)
6
6
7
-
This is for web applications. If you want to use Dropbox's API from Android, try the [Dropbox Core SDK for Android](https://www.dropbox.com/developers/core/sdks/android).
@@ -43,13 +41,13 @@ Save the API key to a JSON file called, say, "test.app":
43
41
## Using the Dropbox API
44
42
45
43
Before your app can access a Dropbox user's files, the user must authorize your application using OAuth 2. Successfully completing this authorization flow gives you an _access token_ for the user's Dropbox account, which grants you the ability to make Dropbox API calls to access their files.
44
+
* Example for a simple web app: [Web File Browser example](examples/web-file-browser/src/com/dropbox/core/examples/web_file_browser/DropboxAuth.java)
45
+
* Example for an Android app: [Android example](examples/android/src/main/java/com/dropbox/core/examples/android/UserActivity.java)
46
+
* Example for a command-line tool: [Command-Line Authorization example](examples/authorize/src/com/dropbox/core/examples/authorize/Main.java)
46
47
47
-
* Authorization example for a simple web app: [Web File Browser example](examples/web-file-browser/src/com/dropbox/core/examples/web_file_browser/DropboxAuth.java)
48
-
* Authorization example for a command-line tool: [Command-Line Authorization example](examples/authorize/src/com/dropbox/core/examples/authorize/Main.java)
49
-
50
-
Once you have an access token, create a [`DbxClient`](http://dropbox.github.io/dropbox-sdk-java/api-docs/v1.8.x/com/dropbox/core/DbxClient.html) and start making API calls.
48
+
Once you have an access token, create a [`DbxClientV2`](https://dropbox.github.io/dropbox-sdk-java/api-docs/v2.0.x/com/dropbox/core/v2/DbxClientV2.html) and start making API calls.
51
49
52
-
You only need to perform the authorization process once per user. Once you have an access token for a user, save it somewhere persistent, like in a database. The next time that user visits your app's, you can skip the authorization process and go straight to creating a `DbxClient` and making API calls.
50
+
You only need to perform the authorization process once per user. Once you have an access token for a user, save it somewhere persistent, like in a database. The next time that user visits your app's, you can skip the authorization process and go straight to creating a `DbxClientV2` and making API calls.
2. Build the SDK: run `mvn package` in the SDK root directory (two levels up from this folder).
11
+
3. In Android Studio, choose "Import Project" and select this folder.
12
+
4. Edit "src/main/AndroidManifest.xml" and "src/main/res/values/strings.xml" and replace `YOUR_APP_KEY_HERE` with your Dropbox API key ([how to get a Dropbox API key](../../ReadMe.md#get-a-dropbox-api-key)).
13
+
5. Build and run.
14
+
15
+
If you don't have Android Studio, you can use the command-line:
16
+
17
+
1. Make sure you have the standalone [Android SDK Tools](http://developer.android.com/sdk/installing/).
18
+
2. Make sure your `ANDROID_SDK` environment variable is set to the path where the standalone Android SDK Tools are installed.
19
+
3. To build: run `./gradlew assemble`.
20
+
4. The example app's ".apk" files should now be in "build/outputs/apk". You can use "adb install" to install them to the emulator or to a real device.
0 commit comments