Skip to content

Commit d0bb6fe

Browse files
authored
Updated Android Example README.
1 parent 1764d7e commit d0bb6fe

File tree

1 file changed

+11
-17
lines changed

1 file changed

+11
-17
lines changed

examples/android/ReadMe.md

Lines changed: 11 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -8,23 +8,17 @@ This example is backwards compatible with Android 5.0 (Lollipop). Ensure your bu
88

99
## Running the example
1010

11-
Prerequisites: Apache Maven (to build the SDK), [Android Studio](http://developer.android.com/sdk/installing/) (not strictly necessary)
11+
Running in [Android Studio](https://developer.android.com/studio) (not strictly necessary)
1212

13-
1. Download this repository.
14-
2. Build the SDK: run `./gradlew build` in the SDK root directory (two levels up from this folder).
15-
3. In Android Studio, choose "Import Project" and select this folder.
16-
4. Edit local.properties and add `DROPBOX_APP_KEY=YOUR_KEY_HERE` with your Dropbox API key ([how to get a Dropbox API key](../../README.md#get-a-dropbox-api-key)).
17-
5. Build and run.
13+
* Download this `dropbox-sdk-java` repository or clone it using `git clone https://github.com/dropbox/dropbox-sdk-java`.
14+
* Open the root folder `dropbox-sdk-java` in the terminal, or open it in Android Studio.
15+
* Create a `local.properties` manually in the Android example project at `examples/android/local.properties` with the content `DROPBOX_APP_KEY=YOUR_KEY_HERE` where `YOUR_KEY_HERE` is your [Dropbox App/Api Key](../../README.md#get-a-dropbox-api-key).
16+
* TIP: You can create this `local.properties` file with the appropriate contents by runing this command `echo "DROPBOX_APP_KEY=YOUR_KEY_HERE" > examples/android/local.properties` on the terminal from the `dropbox-sdk-java`.
17+
* NOTE: This step of creating the `examples/android/local.properties` file is not required to build the app, but is required if you would like to test authentication.
18+
5. Build and run the Android sample via the Android Studio UI.
1819

19-
If you don't have Android Studio, you can use the command-line:
20+
# Notes
2021

21-
1. Make sure you have the standalone [Android SDK Tools](http://developer.android.com/sdk/installing/).
22-
2. Make sure your `ANDROID_SDK` environment variable is set to the path where the standalone Android SDK Tools are installed.
23-
3. To build: run `./gradlew assemble`.
24-
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.
25-
26-
## ProGuard
27-
28-
The Dropbox Java SDK supports ProGuard class file shrinking optimizations. The only requirements to
29-
your ProGuard configuration are to ensure [Jackson Databind](https://github.com/FasterXML/jackson-databind)
30-
classes are handled correctly and annotations are kept. See [proguard-rules.pro](proguard-rules.pro) for an example.
22+
This example project uses the source version of `dropbox-sdk-java`. If you would like to use the published version of the SDK, replace the following in the `examples/android/build.gradle` file.
23+
* Replace `implementation(project(":dropbox-sdk-java"))`
24+
* with `implementation("com.dropbox.core:dropbox-core-sdk:LATEST_VERSION_GOES_HERE")`

0 commit comments

Comments
 (0)