Skip to content

Sample Application Tutorial

siddutgikar edited this page May 12, 2020 · 2 revisions

We have included a sample application in this repository.

Clone the Project

Clone or download the project from this git repository.

Open in Android Studio

To open an existing project in Android Studio, select File -> New -> Import Project or select Open an existing Android Studio Project from the welcome screen. In the file browser that appears, select the Open-Source-UXSDK-Android folder and click Open. Once the Gradle Build has finished running, you should be able to build the project.

Note: If you are running into build issues, please update your Android Studio to the latest version.

Get Keys

Register for a DJI Developer account here or sign into your existing account. Then generate an app key. Make sure to enter "com.dji.ux.beta.sample" as the package name for your new app.

If you would like to use the MapWidget, you'll also need to sign up for an app key from one of the supported providers. See the Map Widget page for more detailed instructions for each provider.

Add Keys to the Sample Application

Open the file android-uxsdk-beta-sample/src/main/res/values/keystrings.xml and replace "YOUR DJI SDK API KEY" with your generated App Key string. If you have generated an App Key from any of the supported map providers, you can replace the corresponding strings in this file as well.

Clone this wiki locally