DJI Mobile SDK for Android V5
repository·dev-sdk-main·Indexed 19 days ago
https://github.com/dji-sdk/mobile-sdk-android-v5A development kit for controlling DJI aircraft hardware and software interfaces via Android devices. It supports enterprise and consumer drone series including Mavic 3, Matrice, and Mini series. The SDK provides APIs for aircraft control and network functionality through modules such as dji-sdk-v5-aircraft and dji-sdk-v5-networkImp.
What's inside DJI Mobile SDK Android V5
- DJI Mobile SDK V5 provides a series of APIs to control the software and hardware interfaces of DJI aircraft. It is designed to help developers build drone solutions on mobile devices by improving the experience and efficiency of MSDK App development. The SDK includes open-source production samples and tutorials.
Overview of DJI Mobile SDK V5
dev-sdk-mainDJI Mobile SDK V5 provides streamlined hardware control interfaces and software service interfaces for drone development. It is designed to improve development efficiency with production-grade sample code and extensive tutorials.
Supported Aircraft Models include:
- DJI Mavic 3TA
- Matrice 400
- Matrice 4D Industry Series
- DJI Mini 4 PRO
- Matrice 4 Industry Series
- Zenmuse H30 Series
- DJI Mini 3 Pro
- DJI Mini 3
- Mavic 3 Industry Series
- Matrice 30 Series
- Matrice 300 RTK
- Matrice 350 RTK
Understand the Sample Code structure
dev-sdk-mainThe
SampleCode-V5directory contains three main parts:- Scenographic Example (
uxsdk): Provides scenographic sample support for aircraft (currently aircraft only). - Sample Module (
sample): A compiled aircraft sample App that depends onuxsdk. - Android SDK V5 AS (
android-sdk-v5-as): Contains configuration files likesettings.gradlefor detailed setup.
For specific configuration details, refer to
SampleCode-V5/android-sdk-v5-as/settings.gradle.- Scenographic Example (
Supported DJI Products for MSDK V5
dev-sdk-mainThe DJI Mobile SDK V5 supports the following product series:
- DJI Mavic 3TA
- Matrice 400
- Matrice 4D Enterprise Series
- DJI Mini4 PRO
- Matrice 4 Enterprise Series
- H30 Series
- DJI Mini3 Pro
- DJI Mini3
- Mavic 3 Enterprise Series
- M30 Series
- M300 RTK
- Matrice 350 RTK
Integrate DJI Android SDK V5 into Android Studio
dev-sdk-mainTo integrate the DJI Android SDK into your Android Studio project, follow the official tutorial for setup and precautions:
Integrate DJI Mobile SDK V5 into Android Studio
dev-sdk-mainTo integrate the DJI Mobile SDK V5 into your Android Studio project, you must include the appropriate AAR dependencies in your
build.gradlefile. The SDK is split into functional modules to allow for optimized builds.Note: Ensure you replace
{sdkVersion}with the specific version you are using (e.g.,5.18.0).// For aircraft support only implementation 'com.dji:dji-sdk-v5-aircraft:5.18.0' compileOnly 'com.dji:dji-sdk-v5-aircraft-provided:5.18.0' // Required for all network-dependent features (standard requirement) runtimeOnly 'com.dji:dji-sdk-v5-networkImp:5.18.0'Reference DJI Mobile SDK V5 AAR Dependencies
dev-sdk-mainThe following AAR packages are available for DJI Mobile SDK V5 (sdkVersion = 5.18.0):
SDK Package Description Usage Method dji-sdk-v5-aircraftMain aircraft package; provides MSDK support for aircraft control. implementationdji-sdk-v5-aircraft-providedProvided aircraft package; provides interfaces related to the aircraft package. compileOnlydji-sdk-v5-networkImpNetwork library package; provides networking capabilities. If omitted, all network-dependent MSDK features will be disabled, though hardware control interfaces will still function. runtimeOnlyAdd DJI SDK V5 dependencies via Gradle
dev-sdk-mainThe SDK is distributed via AAR packages. Use the following dependency configurations in your
build.gradlefile.Note: Replace
{sdkVersion}with the current version (e.g.,5.18.0).Required Packages
SDK package Explanation How to use dji-sdk-v5-aircraftMain package for aircraft control. implementation 'com.dji:dji-sdk-v5-aircraft:{sdkVersion}'dji-sdk-v5-aircraft-providedCompilation package providing aircraft interfaces. compileOnly 'com.dji:dji-sdk-v5-aircraft-provided:{sdkVersion}'dji-sdk-v5-networkImpNetwork library package. Required for all network functions. runtimeOnly 'com.dji:dji-sdk-v5-networkImp:{sdkVersion}'Configuration Scenarios
1. If you only need to support aircraft products:
implementation 'com.dji:dji-sdk-v5-aircraft:{sdkVersion}' compileOnly 'com.dji:dji-sdk-v5-aircraft-provided:{sdkVersion}'2. If you need network functionality (required by default):
runtimeOnly 'com.dji:dji-sdk-v5-networkImp:{sdkVersion}'// Scenario 1: Aircraft support only implementation 'com.dji:dji-sdk-v5-aircraft:5.18.0' compileOnly 'com.dji:dji-sdk-v5-aircraft-provided:5.18.0' // Scenario 2: Including network support runtimeOnly 'com.dji:dji-sdk-v5-networkImp:5.18.0'