DJI Mobile SDK Documentation
      Package:dji.v5.manager.interfaces
      classSince MSDK 5.0.0

      ISDKManager

      Class that is used for SDK management.

      Package dji.v5.manager.interfacesAndroid · Java / Kotlin

      Class that is used for SDK management. It is used to initialize and register to SDK, connect to product, get product information. Also it can get the other manager classes and debug tools.

      Supported since MSDK 5.0.0

      Members

      15 members

      Method

      7

      Enum

      3

      Class

      5
      method
      method

      init

      void init(Context context, InitSettings settings, @NonNull SDKManagerCallback callback)

      MSDK is initialized, and the MSDK internal module initialization operation is performed. After the initialization is completed, registerApp needs to be called to perform the MSDK registration operation.

      Note

      MSDK will always hold a strong reference to the SDKManagerCallback object, please do not let SDKManagerCallback to hold objects with a short life cycle in the program, such as Activity and Fragment, otherwise there will be memory leaks.

      Parameters

      NameTypeDescription
      contextContext Context instance applied.
      settingsInitSettings Initial configuration.
      callback@NonNull SDKManagerCallback return callback of the execution result.
      method
      method

      init

      Deprecated
      @Deprecated
      void init(Context context, @NonNull SDKManagerCallback callback)

      Deprecated, it is recommended to use the new init in version 5.20.0. MSDK is initialized, and the MSDK internal module initialization operation is performed. After the initialization is completed, registerApp needs to be called to perform the MSDK registration operation.

      Note

      MSDK will always hold a strong reference to the SDKManagerCallback object, please do not let SDKManagerCallback to hold objects with a short life cycle in the program, such as Activity and Fragment, otherwise there will be memory leaks.

      Parameters

      NameTypeDescription
      contextContext Context instance applied.
      callback@NonNull SDKManagerCallback return callback of the execution result.
      method

      isRegistered

      boolean isRegistered()

      Get MSDK registration status. true means that the MSDK has been registered successfully.

      Return

      NameDescription
      booleantrue means that the MSDK has been registered successfully.
      method
      method

      destroy

      void destroy()

      Release MSDK’s occupation of resources. After release, all callback interfaces will no longer receive any event updates from the system. Note: init and destroy should appear in pairs in the App.

      method

      registerApp

      void registerApp()

      MSDK registration, MSDK connects to the DJI server through the Internet to verify the App KEY applied by the developer on the official website. This method needs to be called after the INITIALIZE_COMPLETE event is returned in the onInitProcess method. Whether the registration is successful or the registration fails, it will be returned in SDKManagerCallback. After successful registration, MSDK will automatically start to connect to the hardware product. If the hardware product connection is successful, the onProductConnect method will be called back.

      Note

      1. If the developer uses the offline license file method to open LDM before registerApp, the registration operation can be completed without connecting to the Internet.
      2. If you use the method of downloading the license file from the Internet to enable LDM, you need to pass in MSDK_INIT_AND_REGISTRATION to enableLDM, in order to connect to the DJI server through the Internet to verify the App KEY and complete the registration process.
      3. After MSDK is successfully registered, the registration information will be cached locally. When MSDK is started again, MSDK will verify the locally cached information to complete the registration process without connecting to the Internet. It is not necessary to perform online registration again until the application is reinstalled to complete the registration process.

      method

      getSDKVersion

      String getSDKVersion()

      Get the MSDK version number.

      Return

      NameDescription
      StringReturn the MSDK version number.
      method

      getProductCategory

      PackageProductCategory getProductCategory()

      Get the MSDK package type.

      Return

      NameDescription
      PackageProductCategoryReturn the MSDK package type.
      enum

      PackageProductCategory

      MSDK package type.

      Enum Members

      NameDescription
      AIRCRAFTAircraft category, this MSDK package only contains all aircraft supported by MSDK.
      HANDHELDHandheld category, this MSDK package only contains all handhelds supported by MSDK.
      ALLAll categories, this MSDK package contains all DJI products supported by MSDK.
      class

      SDKManagerCallback

      Since MSDK 5.0.0
      interface SDKManagerCallback

      SDKManager callback class.

      class

      InitSettings

      Since MSDK 5.20.1
      class InitSettings

      MSDK initialization settings.

      enum

      SDKLinKMode

      MSDK link mode.

      Enum Members

      NameDescription
      LOCALLocal mode.
      REMOTE_PILOTRemote Pilot mode.
      class

      PluginAPPConfig

      Since MSDK 5.20.1
      @Keep
      class PluginAPPConfig implements Parcelable

      Plugin APP information configuration.

      enum

      ServerState

      Connection state with the remote service.

      Enum Members

      NameDescription
      UNINITIALIZEDThe service is not initialized.
      CONNECTEDConnected to the service.
      DISCONNECTThe service is disconnected.
      INCOMPATIBLEThe service version is incompatible.
      class

      APPVersion

      Since MSDK 5.20.1
      class APPVersion implements Parcelable

      APP version information.

      class

      OpenLocation

      Since MSDK 5.20.1
      @Keep
      class OpenLocation implements Parcelable

      Open geographic location information, containing latitude, longitude and altitude data.