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

      ILDMManager

      LDM(Local Data Mode) manager is used to enable or disable the LDM mode.

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

      LDM(Local Data Mode) manager is used to enable or disable the LDM mode. After enabling LDM, the MSDK’s internet access will be restricted. You can callenableLDMto enable LDM mode. Also, you can configure the exempt modules when enabling the LDM in order to allow those modules to access internet. For example, allowing RTK module as an exempt module in LDM will allow the RTK module to connect with RTK server to ensure the accuracy of navigation. Also, allowing a flysafe module as an exempt module in LDM can still access the flysafe ever to ensure the safety of flight. You have to apply successfully from our developer website(https://developer.dji.com/user/ldm/) and receive a LDM licence in order to use this feature.

      Supported since MSDK 5.0.0

      Members

      8 members

      Method

      7

      Enum

      1
      method

      isLDMLicenseLoaded

      boolean isLDMLicenseLoaded()

      After callingenableLDM, MSDK will check if there is a local LDM license. Otherwise, it will ask the server to transmit a LDM license. If the LDM license has been loaded and activated, then returntrue.

      Return

      NameDescription
      booleantruemeans the LDM certificate has been loaded and activated.
      method

      isLDMEnabled

      boolean isLDMEnabled()

      Return whether the LDM is enabled.

      Return

      NameDescription
      booleantruemeans LDM is enabled.
      method

      isNetworkServiceEnabledForModule

      boolean isNetworkServiceEnabledForModule(LDMExemptModule module)

      Check the internet access of input LDMExemptModule.

      Parameters

      NameTypeDescription
      moduleLDMExemptModule LDM exempt module.

      Return

      NameDescription
      booleantruemeans LDM is not enabled or the input LDMExemptModule still has internet access when LDM is enabled.false means LDM is enabled and the input LDMExemptModule has no internet access.
      method

      loadLocalLDMLicenseContent

      IDJIError loadLocalLDMLicenseContent(String content)

      Load the content of LDM license, the content is the license_appname.txt given by developer website after successfully applying the LDM license.

      Parameters

      NameTypeDescription
      contentString The content of LDM License, the content is the license_appname.txt given by developer website after successfully applying for the LDM license.

      Return

      NameDescription
      IDJIErrorReturn the loading execution result of LDM License. The result is successful if returning null.
      method

      getLocalLDMLicensePath

      String getLocalLDMLicensePath(Context ctx)

      Get the saved path of the offline LDM license. Please put the offline LDM license under this directory.

      MSDK 5.0.0 start support

      Parameters

      NameTypeDescription
      ctxContext Current application's context

      Return

      NameDescription
      StringReturn the saved path of the offline LDM license.
      method
      method

      enableLDM

      void enableLDM(Context context, CommonCallbacks.CompletionCallback callback, LDMExemptModule... modules)

      A method of enabling LDM mode. When calling this method, you can pass multiple LDMExemptModule parameters in. It means the exempt modules when LDM is enabled. E.g. When you pass RTK and FLY_SAFE in, those modules can still access internet after enabling LDM.

      Note

      1. You have to call this method after calling SDKManager.init() method in order to enable LDM. If you don’t have an offline license, then you need to pass this parameter in, MSDK_INIT_AND_REGISTRATION. This will allow MSDK registration module to complete the registration.
      2. Make sure your offline LDM license(license_appname.txt)is saved in the correct directory when you use an offline LDM license to enable LDM. You can use getLocalLDMLicensePath to get the offline LDM License path.
      3. Except save the offline LDM license to the specified path, you can also call loadLocalLDMLicenseContent to load the content of LDM license to the LDM module.
      4. If you don’t have an offline LDM license, the first time you call this method will access DJI LDM server to download the LDM license. Later on, calling this method will read the local cache.
      5. If you want to use the offline LDM license, you need to apply fromhttps://developer.dji.comloin your user account and apply.


      Parameters

      NameTypeDescription
      contextContext Pass a Application's Context in.
      callbackCommonCallbacks.CompletionCallback Return a callback of the execution result.
      modulesLDMExemptModule... If you need some modules than are exempt when LDM is enabled so that they can still access internet, you can set this in modules.
      method

      disableLDM

      void disableLDM(CommonCallbacks.CompletionCallback callback)

      Disable LDM.

      Parameters

      NameTypeDescription
      callbackCommonCallbacks.CompletionCallback Return a callback of the execution result.
      enum

      LDMExemptModule

      LDM exempt modules type, set the LDM exempt modules in order to allow them access internet.

      Enum Members

      NameDescription
      MSDK_INIT_AND_REGISTRATIONMSDK registration module. It can still access internet when LDM is calling enableLDM and LDM gets enabled.
      LIVE_STREAMINGLive stream module. It can still access internet when LDM is enabled.
      RTKRTK module. It can still access internet when LDM is enabled.
      FIRMWARE_UPGRADEFirmware upgrade module. It can still access internet when LDM is enabled.
      EXPERENCE_IMPROVEMENTExperience improvement module. It can still access internet when LDM is enabled.
      USER_ACCOUNTUser account module. It can still access internet when LDM is enabled.
      LTELTE module. It can still access internet when LDM is enabled.
      FLY_SAFEFly safe module. It can still access internet when LDM is enabled.
      REAL_NAMEReal name module. It can still access internet when LDM is enabled.
      OIDThe OID function can access the network normally when LDM is enabled.