Quick Start

2022-07-28
No Rating

Register as a DJI Developer

Register for a DJI Developer account here.

During the registration process, email information and a credit card or phone number will need to be supplied to verify the registration. Any credit card information given will only be used for verification and will not be charged.

This guide assumes you are using Android Studio Bumblebee 2021.1.1 and above.

Generate an App Key

Every application needs a unique App Key to initialize the SDK.

To create an App Key for an application:

Go to the DJI developer Developer Center

  • Select the "Apps" tab on the left.
  • Select the "Create App" button on the right.
  • Enter the APP Name, Software Platform, Package Name, Category, and Description.
  • An application activation email will be sent to complete App Key generation.
  • The App Key will appear in the developer center, and can be copied and pasted into the application.

Android Sample App

The SDK doesn't need to be downloaded to run the Android sample application as it's already included in the project.

Android Sample Code Setting

  1. Download or clone the MSDK Android sample project from Github: https://github.com/dji-sdk/Mobile-SDK-Android-V5

  2. If you want to use their own project, generated "App Key" string should be copied to android:value="" in "AndroidManifest.xml" file.

<!--
    ADD API_KEY HERE and make sure you
    are connected to the Internet before
    the app is launched
-->
<meta-data
    android:name="com.dji.sdk.API_KEY"
    android:value="" />
  1. If you use the MSDK sample project directly, our sample project has packaged the setting at setp 2. Open the sample project at Android Studio, you can replace the AIRCRAFT_API_KEY = Please add your app key here. in "gradle.properties" by generated "App Key" string.

Run the Sample App

Compile and install the sample code into the M30 Series remote controller (ie DJI RC Plus), and then connect the DJI RC Plus to the M30 Series aircraft to run the sample application.

Before the usage, MSDK Sample will apply for some permissions. The following are the range of possible permission application.

<!-- SDK permission requirement -->
    <uses-permission android:name="android.permission.BLUETOOTH" />
    <uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
    <uses-permission android:name="android.permission.VIBRATE" />
    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
    <uses-permission android:name="android.permission.CHANGE_WIFI_STATE" />
    <uses-permission android:name="android.permission.RECORD_AUDIO" />
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.READ_PHONE_STATE" />
    <uses-permission android:name="android.permission.KILL_BACKGROUND_PROCESSES"/>

The following permissions must be opened, the rest can be open according to users' requirements.

  • INTERNET: Allows applications to open network sockets.
  • ACCESS_COARSE_LOCATION: Allows an app to access approximate location.
  • ACCESS_NETWORK_STATE: Allows applications to access information about networks.
  • ACCESS_FINE_LOCATION: Allows an app to access precise location.
  • WRITE_EXTERNAL_STORAGE: Allows an application to write to external storage.
  • READ_EXTERNAL_STORAGE: Allows an application to read from external storage.
  • READ_PHONE_STATE: Allows read only access to phone state, including the current cellular network information, the status of any ongoing calls, and a list of any PhoneAccounts registered on the device.

Press to check precise meaning of permissionsopen in new window.

If the words "Registration Status: Registered" appear in the upper left corner of the main interface of the Sample, the sample code is running successfully, and "Product Name: M30_SERIES" appears, indicating that the MSDK is successfully connected to the aircraft. The following figure shows the flow chart of the SDK Manager API call.

SDK Manager.png

Notice:

When starting a third-party App based on MSDK on the remote controller(DJI RC Plus) that matching M30 series aircraft, official app DJI Pilot should be forcibly exited from the application and notification interface under the DJI RC Plus remote controller system settings interface to ensure a normal start of the third-party app.

conflict_en.gif

Important Steps Before Run MSDK V5 On Your Own Project

1. Check packagingOptions in "build.gradle" file on your project app

packagingOptions setting needs to be the same as that in our sample.

Press to check and refer to "build.gradle" fileopen in new window.

Current content of packagingOptions is shown below:

packagingOptions {
    doNotStrip "*/*/libconstants.so"
    doNotStrip "*/*/libdji_innertools.so"
    doNotStrip "*/*/libdjibase.so"
    doNotStrip "*/*/libDJICSDKCommon.so"
    doNotStrip "*/*/libDJIFlySafeCore-CSDK.so"
    doNotStrip "*/*/libdjifs_jni-CSDK.so"
    doNotStrip "*/*/libDJIRegister.so"
    doNotStrip "*/*/libdjisdk_jni.so"
    doNotStrip "*/*/libDJIUpgradeCore.so"
    doNotStrip "*/*/libDJIUpgradeJNI.so"
    doNotStrip "*/*/libDJIWaypointV2Core-CSDK.so"
    doNotStrip "*/*/libdjiwpv2-CSDK.so"
    doNotStrip "*/*/libffmpeg.so"
    doNotStrip "*/*/libFlightRecordEngine.so"
    doNotStrip "*/*/libvideo-framing.so"
    doNotStrip "*/*/libwaes.so"
    doNotStrip "*/*/libagora-rtsa-sdk.so"
    doNotStrip "*/*/libc++.so"
    doNotStrip "*/*/libc++_shared.so"
    doNotStrip "*/*/libmrtc_28181.so"
    doNotStrip "*/*/libmrtc_agora.so"
    doNotStrip "*/*/libmrtc_core.so"
    doNotStrip "*/*/libmrtc_core_jni.so"
    doNotStrip "*/*/libmrtc_data.so"
    doNotStrip "*/*/libmrtc_log.so"
    doNotStrip "*/*/libmrtc_onvif.so"
    doNotStrip "*/*/libmrtc_rtmp.so"
    doNotStrip "*/*/libmrtc_rtsp.so"
}

2. Check "proguard" file on your project app

Copy sample.proopen in new window to your project to avoid obfuscation error.

Specify the location of "build.gradle" file at “buildTypes” setting and make sure “minifyEnabled" is true. Press to check and refer to "build.gradle" fileopen in new window.

3. Use "com.secneo.sdk.Helper.install(this)"

You need to add com.secneo.sdk.Helper.install(this) to your paoject. Press for referenceopen in new window.

4. Check buildTypes in "build.gradle" file on your project app

Please make sure shrinkResources is false to avoid resource compression.

Press to check and refer to "build.gradle" fileopen in new window.

Current content of buildTypes is shown below:

    buildTypes {
        release {
            minifyEnabled true
            shrinkResources false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), '../../android-sdk-v5-as/proguard-relative/sample.pro'
        }
        debug {
            minifyEnabled true
            shrinkResources false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), '../../android-sdk-v5-as/proguard-relative/sample.pro'
        }
    }

5. Check android in "build.gradle" file on your project app

Please make sure “arm64-v8a” platform is specified. ”armeabi-v7a“ is not supported currently.

Press to check and refer to "build.gradle" fileopen in new window.

Current content of android is shown below:

android {
    compileSdkVersion Integer.parseInt(project.ANDROID_COMPILE_SDK_VERSION)

    defaultConfig {
        applicationId "com.dji.sampleV5.aircraft"
        minSdkVersion Integer.parseInt(project.ANDROID_MIN_SDK_VERSION)
        targetSdkVersion Integer.parseInt(project.ANDROID_TARGET_SDK_VERSION)
        versionCode 1
        versionName "1.0"
        manifestPlaceholders["API_KEY"] = project.AIRCRAFT_API_KEY

        ndk {
            abiFilters 'arm64-v8a'
        }
    }

Differences between MSDK 4.X and 5.X

The following are the comparison and illustration of core interfaces between MSDK 4.X and MSDK 5.X. It mainly includes the DJIKey type interfaces and some core interfaces, for example, the SDK registration management class(SDKManager), device health status management class(DeviceHealthManager) and so on. We hope to assist users to quickly understand and use MSDK 5.X .

Notice:

  1. Version 4.X is not compatiable with version 5.X, they cannot be used together.
  2. MSDK 5.X currently only supports: M30 Series and M300 RTK, and will only supports some of the new DJI products in the future.

DJIKey differences Illustration

DJIKey

Most interaction functions with the device of MSDK 5.X is realized by the DJIKey. One DJIKey represents a specified module function.

In version 4.X, most interface is the encapsulation of the DJIKey. For example, the Camera$startShootPhoto is the application of CameraKey.START_SHOOT_PHOTO. In the following comparison table, only show the DJIKey for 4.X rather than the interface. If there are any special situation, it will be dealt.

Take the method areMotorsOn from Motors of FlightControllerState for example. Firstly, search the introduction of method areMotorsOn from 4.X documentationopen in new window. Then search the corresponding 4.X DJIKey - FlightControllerKey.ARE_MOTOR_ON. Finally, and find the corresponding 5.X DJIKey of method areMotorsOn from migration documentation.

对照指引 en.gif

Difference:

Function Description4.X5.XIllustration/Difference
DJIKey operationKeyManagerIKeyManagerKey operation encapsulation class
DJIKey creationCreate methods of various Various Key Class, like CameraKey$create, CameraKey$createLensKey, FlightControllerKey$create and so on.KeyToolsThe Key creation of 5.X uniformly uses the related interface of Keytools.
DJIKey-ProductProductKeyProductKey5.X is for the whole machine.
DJIKey-AirLinkAirLinkKeyAirLinkKeyAirLink related
DJIKey- base stationBaseStationKeyRtkBaseStationKeyRTK base station related
DJIKey-batteryBatteryKeyBatteryKeyBattery related
DJIKey-cameraCameraKeyCameraKeyCamera related
DJIKey-flight controlFlightControllerKeyFlightControllerKeyFlight control related
DJIKey-gimbalGimbalKeyGimbalKeyGimbal related
DJIKey-LidarLidarKeyLidarKeyLidar related
DJIKey-DJI payloadPayloadKeyPayloadKeyPayload related
DJIKey-radarRadarKeyRadarKeyRadar related
DJIKey-remote controllerRemoteControllerKeyRemoteControllerKeyRemote controller related
KeyManager
Function Description4.X5.XIllustration/Difference
Read dataKeyManager$getValueIKeyManager$getValuesimilar
Set dataKeyManager$setValueIKeyManager$setValuesimilar
ActionKeyManager$performActionIKeyManager$performActionsimilar
ListenKeyManager$addListenerIKeyManager$listen5.X add an concept of Holder, developer can bind the listeners to Holder. When developer remove the listener, they can be cancelled together through IKeyManager$cancelListen(Object listenHolder).
Remove the listenerKeyManager$removeListenerIKeyManager$cancelListenSee the illustration of Listen
Remove the data of KeyKeyManager$removeKeyNoneNot supported in 5.X
How to CreateKey

In 4.X, the create function of DJIKey is defined at various module Key. Take the CameraKey for example:

  1. Create the key of main pisition: CameraKey$create(String paramKey)
  2. Create the key of specified position: CameraKey$create(String paramKey, int componentIndex)
  3. Create the key of specified position and specified lens: CameraKey$createLensKey(String paramKey, int componentIndex, int subComponentIndex)

In 5.X, the create function of DJIKey is uniformly defined in KeyTools. Take the CameraKey for example:

Only one method to create the DJIKey of specified position and specified: KeyTools$createCameraKey(DJIKeyInfo<T> mKeyInfo, ComponentIndexType componentIndexType, CameraLensType cameraLensType). If the related DJIKey does not define the lens, use the CameraLensType.CAMERA_LENS_DEFAULT (At Kotlin, DJIKeyInfo have expansion method: createCamera. The default value of cameraLensType is CameraLensType.CAMERA_LENS_DEFAULT).

Parameter Illustration:

Function Description4.X5.XIllustration/Difference
DJIKey InformationparamKeymKeyInfoDescribe the basic information of DJIKey.
Camera PositioncomponentIndexComponentIndexTypeCamera position, it is enumeration in 5.X.
Lens PositionsubComponentIndexCameraLensTypeLens position, it is enumeration in 5.X.

The rest part of 5.X, please refer to KeyToolsopen in new window.

ProductKey Mapping Relation
Function Description4.X5.XIllustration/Difference
Device ConnectionProductKey.CONNECTIONProductKey.KeyConnectionsimilar
FligthControllerKey Mapping Relation
Function Description(FligthController)4.X5.XIllustration/Difference
Device connectionFlightControllerKey.CONNECTIONFlightControllerKey.KeyConnectionsimilar
Motor is start or notFlightControllerKey.ARE_MOTOR_ONFlightControllerKey.KeyAreMotorsOnsimilar
airSense connection statusFlightControllerKey.AIR_SENSE_SYSTEM_CONNECTEFlightControllerKey.KeyAirSenseSystemConnectedsimilar
airSense informationFlightControllerKey.AIR_SENSE_SYSTEM_WARNING_LEVEL , FlightControllerKey.AIR_SENSE_AIRPLANE_STATESFlightControllerKey.KeyAirSenseSystemInformationsimilar
Drone heightFlightControllerKey.ALTITUDEFlightControllerKey.KeyAltitudesimilar
Height of takeoff pointFlightControllerKey.TAKEOFF_LOCATION_ALTITUDEFlightControllerKey.KeyTakeoffLocationAltitudesimilar
Height of home pointFlightControllerKey.GO_HOME_HEIGHT_IN_METERSFlightControllerKey.KeyGoHomeHeightsimilar
Home point locationFlightControllerKey.HOME_LOCATION_LATITUDE, FlightControllerKey.HOME_LOCATION_LONGITUDEFlightControllerKey.KeyHomeLocationsimilar
Current heightFlightControllerKey.ALTITUDEFlightControllerKey.KeyAltitudesimilar
Drone locationFlightControllerKey.AIRCRAFT_LOCATION_LATITUDE, FlightControllerKey.AIRCRAFT_LOCATION_LONGITUDEFlightControllerKey.KeyAircraftLocationThe latitude and longitude in 4.X are two Keys. In 5.X, it is an object contains two data.
Is flying or notFlightControllerKey.IS_FLYINGFlightControllerKey.KeyIsFlyingsimilar
Is landing or notFlightControllerKey.IS_LANDINGFlightControllerKey.KeyIsInLandingModesimilar
Need to confirm whether to landFlightControllerKey.IS_LANDING_CONFIRMATION_NEEDEDFlightControllerKey.KeyIsLandingConfirmationNeededsimilar
Forced landing heightFlightControllerKey.FORCE_LANDING_HEIGHTFlightControllerKey.KeyTouchDownConfirmLimitHeightsimilar
Flight mode stringFlightControllerKey.FLIGHT_MODE_STRINGFlightControllerKey.KeyFlightModeStringsimilar
Landing protection stateFlightControllerKey.LANDING_PROTECTION_STATEFlightAssistantKey.KeyLandingProtectionStatesimilar
Low battery flight control behaviorFlightControllerKey.BATTERY_THRESHOLD_BEHAVIORFlightControllerKey.KeyBatteryThresholdBehaviorsimilar
Battery for go homeFlightControllerKey.BATTERY_PERCENTAGE_NEEDED_TO_GO_HOMEFlightControllerKey.KeyBatteryPercentNeededToGoHomesimilar
CameraKey Mapping Relation
Function Description(Camera)4.X5.XIllustration/Difference
Connection statusCameraKey.CONNECTIONCameraKey.KeyConnectionsimilar
Start shooting photoCameraKey.START_SHOOT_PHOTOCameraKey.KeyStartShootPhotosimilar
Stop shooting photoCameraKey.STOP_SHOOT_PHOTOCameraKey.KeyStopShootPhotosimilar
AE Lock switchCameraKey.AE_LOCKCameraKey.KeyAELockEnabledsimilar
Whether is recordingCameraKey.IS_RECORDINGCameraKey.KeyIsRecordingsimilar
Recording time in secondsCameraKey.CURRENT_VIDEO_RECORDING_TIME_IN_SECONDSCameraKey.KeyRecordingTimesimilar
Camera typeCameraKey.CAMERA_TYPECameraKey.KeyCameraTypesimilar
Storage typeCameraKey.CAMERA_STORAGE_LOCATIONCameraKey.KeyCameraStorageLocationsimilar
SD card stateCameraKey.SDCARD_STATECameraKey.KeyCameraSDCardStatesimilar
Internal storage statusCameraKey.INNERSTORAGE_STATECameraKey.KeyInternalStorageStatesimilar
Available recording time in seconds of current SD CardCameraKey.SDCARD_AVAILABLE_RECORDING_TIME_IN_SECONDSCameraKey .KeySSDAvailableRecordingTimeInSecondssimilar
Available recording time in seconds of current internal storageCameraKey.INNERSTORAGE_AVAILABLE_RECORDING_TIME_IN_SECONDSCameraKey.KeyInternalStorageAvailableVideoDurationsimilar
Start recordingCameraKey.START_RECORD_VIDEOCameraKey.KeyStartRecordsimilar
Stop recordingCameraKey.STOP_RECORD_VIDEOCameraKey.KeyStopRecordsimilar
AEB settingCameraKey.PHOTO_AEB_COUNTCameraKey.KeyAEBSettingsThe count of 4.X in the hotoAEBSettings class of the 5.X.
Photo burst countCameraKey.PHOTO_BURST_COUNTCameraKey.KeyPhotoBurstCountsimilar
Photo burst settingCameraKey.PHOTO_TIME_INTERVAL_SETTINGSCameraKey.KeyPhotoIntervalShootSettingssimilar
raw format photo burst countCameraKey.PHOTO_RAW_BURST_COUNTCameraKey.KeyRawBurstCountsimilar
Panorama modeCameraKey.PHOTO_PANORAMA_MODECameraKey.KeyPhotoPanoramaModesimilar
Whether is shootingCameraKey.IS_SHOOTING_PHOTOCameraKey.KeyIsShootingPhotosimilar
Whether is sotring photoCameraKey.IS_STORING_PHOTOCameraKey.KeyCameraStoringFilesimilar
Whether shooting is allowedCameraKey.IS_SHOOTING_PHOTO_ENABLEDCameraKey.KeyShootPhotoNotAllowedsimilar
Whether is shooting panorama photoCameraKey.IS_SHOOTING_PANORAMA_PHOTOCameraKey.KeyIsShootingPhotoPanoramasimilar
Exposure modeCameraKey.EXPOSURE_MODECameraKey.KeyExposureModesimilar
Range of exposure modeCameraKey.EXPOSURE_MODE_RANGECameraKey.KeyExposureModeRangesimilar
ISO settingCameraKey.ISOCameraKey.KeyISOsimilar
Range of ISO settingCameraKey.ISO_RANGECameraKey.KeyISORangesimilar
Exposure settingCameraKey.EXPOSURE_SETTINGSCameraKey.KeyExposureSettingssimilar
Exposure sensitivity settingCameraKey.EXPOSURE_SENSITIVITY_MODECameraKey.KeyExposureSensitivityModesimilar
EI valueCameraKey.EI_VALUECameraKey.KeyEIsimilar
Recommanded EI valueCameraKey.RECOMMENDED_EI_VALUECameraKey.KeyRecommendedEIsimilar
Range of EI valueCameraKey.EI_VALUE_RANGECameraKey.KeyEIRangesimilar
Camera modeCameraKey.MODE/CameraKey.FLAT_CAMERA_MODECameraKey.KeyCameraModeIn 5.X, we integrate two ModeKeys in 4.X into one.
Camera video stream sourceCameraKey.CAMERA_VIDEO_STREAM_SOURCECameraKey.KeyCameraVideoStreamSourcesimilar
Focus modeCameraKey.FOCUS_MODECameraKey.KeyCameraFocusModesimilar
Metering modeCameraKey.METERING_MODECameraKey.KeyCameraMeteringModesimilar
Focus targetCameraKey.FOCUS_TARGETCameraKey.KeyCameraFocusTargetsimilar
Spot metering targetCameraKey.SPOT_METERING_TARGETCameraKey.KeySpotMeteringTargetPointsimilar
GimbalKey Mapping Relation
Function Description(Gimbal)4.X5.XIllustration/Difference
Gimbal connection statusGimbalKey.CONNECTIONGimbalKey.KeyConnectionsimilar
Gimbal attitudeGimbalKey.ATTITUDE_IN_DEGREESGimbalKey.KeyGimbalAttitudesimilar
Gimbal rotateGimbalKey.ROTATEGimbalKey.KeyRotateBySpeed, GimbalKe.KeyRotateByAngleIn 5.X, there are two keys.
RemoteControlKey Mapping Relation
Function Description(RemoteControl)4.X5.XIllustration/Difference
Remote controller modeRemoteControllerKey.MODERemoteControllerKey.KeyRcMachineModesimilar
Connection eventRemoteControllerKey.CONNECTIONRemoteControllerKey.KeyConnectionsimilar
Battery statusRemoteControllerKey.BATTERY_STATERemoteControllerKey.KeyBatteryInfosimilar
Whether is low batteryRemoteControllerKey.IS_CHARGE_REMAINING_LOWRemoteControllerKey.KeyBatteryInfoIt needs developers to count by themselves. In 4.X, battery less than 30% is low battery.
Remote controller GPS informationRemoteControllerKey.GPS_DATARemoteControllerKey.KeyRcGPSInfosimilar
Remote controller mode settingRemoteControllerKey.AIRCRAFT_MAPPING_STYLERemoteControllerKey.KeyControlModeCompared with 4.X, the remote controller mode can be defined directly through enumeration in 5.X.
RTKKey Mapping Relation
Function Description(RTK)4.X5.XIllustration/Difference
Home point data sourceFlightControllerKey.RTK_FUSION_HOME_LOCATION_DATA_SOURCERtkMobileStationKey.KeyRTKHomePointInfosimilar
Whether to set the take off heightFlightControllerKey.RTK_FUSION_HAS_SET_TAKE_OFF_ALTITUDERtkMobileStationKey.KeyRTKTakeoffAltitudeInfosimilar
Whether to enable RTKFlightControllerKey.RTK_ENABLEDRtkMobileStationKey.KeyRTKEnablesimilar
Whether RTK is supportedFlightControllerKey.IS_RTK_SUPPORTEDFlightControllerKey.KeyIsRtkSupportedsimilar
Whether RTK is connectedFlightControllerKey.IS_RTK_CONNECTEDRtkMobileStationKey.KeyConnectionsimilar
BatteryKey Mapping Relation
Function Description(Battery)4.X5.XIllustration/Difference
Battery temperatureBatteryKey.TEMPERATUREBatteryKey.KeyBatteryTemperaturesimilar
Battery powerBatteryKey.CHARGE_REMAINING_IN_PERCENTBatteryKey.KeyChargeRemainingInPercentsimilar
Battery voltageBatteryKey.CELL_VOLTAGESBatteryKey.KeyCellVoltagessimilar
Exception informationBatteryKey.LATEST_WARNING_RECORDBatteryKey.KeyBatteryExceptionIn 5.X, we integrate into this key.
Aggregation informationBatteryKey.AGGREGATION_STATEBatteryKey.KeyNumberOfConnectedBatteries, BatteryKey.KeyIsAnyBatteryDisconnected, BatteryKey.KeyIsCellDamaged, BatteryKey.KeyIsFirmwareDifferenceDetected, BatteryKey.KeyIsVoltageDifferenceDetected, BatteryKey.KeyIsLowCellVoltageDetected, BatteryKey.KeyBatteryOverviewsIn 4.X, we read the aggregation information of multi-battery. When create DJKey in 5.X, ComponentIndexType.AGGREGATION is passed in.

DJI Core Module Differences Illustration

ISDKManager

ISDKManager is the entrance management class. Compared with 4.X, it makes some simpilification. Please refer to this article:Quick Startopen in new window, which introduces the registration, setting, App Key application and how to use the sample code.

Function Description
4.x5.xIllustration/Difference
Registration/ActivitionDJISDKManager$registerAppSDKManager$init and SDKManager$registerApp5.x extractes the part of init. Developers only need to call the init once after the application starts.
Device Connection EventSDKManagerCallback$onComponentChangeUse varioous KeyConnections of Key, for example: CameraKey.KeyConnection, FlightControllerKey.KeyConnection5.x listens the device connection event through KeyConnection of each module.

Virtual Stick Module

The interfaces of virtual stick in 4.X and 5.X are very different. Please refer the 5.X documentation: Virtual Stick Sampleopen in new window.

If you used the DJIKey to achieve, there are the follwing comparisons:

Function Description(VirtualStick)4.X5.XIllustration/Difference
Enable/disable the virtual stickFlightControllerKeys.VIRTUAL_STICK_CONTROL_MODE_ENABLEDFlightControllerKey.KeyVirtualStickEnabledsimilar
Send the virtual stick dataFlightControllerKeys.SEND_VIRTUAL_STICK_FLIGHT_CONTROL_DATAFlightControllerKey.KeySendVirtualStickFlightControlDataOverall data is similar

Video Stream Module

Compared with 4.X, the video stream function in 5.X simplified the operation a lot. Please refer to 5.X documentation: Video Stream Sampleopen in new window.

Live Stream Module

Compared with 4.X, the live stream function in 5.X is more abundant, and supports more protocol. Please refer to 5.X documentation: Live Stream Sampleopen in new window.

Diagnostic Module

In 5.X, diagnostic is completed through IDeviceHealthManager. Please refer to 5.X documentation: Diagnostic Sampleopen in new window.

Parameters comparison:

Description4.X5.XIllustration/Difference
Error codeDJIDiagnostics$getCodeDJIDeviceHealthInfo$informationCodeCompared with 4.X, the hms error code in 5.X is more easier to check, more comprehensive and more in amount.
Error descriptionDJIDiagnostics$getReason, DJIDiagnostics$getSolutionDJIDeviceHealthInfo$title, DJIDeviceHealthInfo$descriptionIn 5.X, they are unified as titile and error description(English and Chinese are supported).

Simulator Module

Please refer to 5.X documentation: Simulator Sampleopen in new window.

Media File Module

Please refer to 5.X documentation: Media File Sampleopen in new window.

Waypoint Module

Currently, the waypoint is send to the drone by KMZ file. Please refer to 5.X documentation: Waypoint Sampleopen in new window

RTK Module

Please refer to 5.X documentation: RTK Sampleopen in new window.

LDM Module

Please refer to 5.X documentation: LDM Sampleopen in new window.