This shows the Dropbox API authorization flow and some API calls to retrieve files.
This example is backwards compatible with Android 4.4 (KitKat). Ensure your build environment supports at least Android SDK version 19.
Prerequisites: Apache Maven (to build the SDK), Android Studio (not strictly necessary)
- Download this repository.
- Build the SDK: run
./gradlew install
in the SDK root directory (two levels up from this folder). - In Android Studio, choose "Import Project" and select this folder.
- 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). - Build and run.
If you don't have Android Studio, you can use the command-line:
- Make sure you have the standalone Android SDK Tools.
- Make sure your
ANDROID_SDK
environment variable is set to the path where the standalone Android SDK Tools are installed. - To build: run
./gradlew assemble
. - 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.
The Dropbox Java SDK supports ProGuard class file shrinking optimizations. The only requirements to your ProGuard configuration are to ensure Jackson Databind classes are handled correctly and annotations are kept. See proguard-rules.pro for an example.