DJI Mobile SDK Documentation

      class LDMManager

      class LDMManager
      Package:dji.sdk.sdkmanager
      Description:

      Local Data Mode (LDM) manager. When Local Data Mode is enabled, the SDK's access to the internet is restricted. Only application registration (confirming the app key is valid) will be unrestricted. All other SDK services will be restricted. When the SDK's internet access is restricted, all SDK services that require an internet connection will not be available or able to update. For instance, the Fly Zone manager will not be able to update the fly zone data base, retrieve the latest TFRs (temporary flight restrictions) or unlock fly zones. LDM is therefore most appropriate for users that have very stringent data requirements, and are able to accommodate this restricted functionality. LDM is not available when operating in China.

      Class Members:
      Check LDM Support
      method
      method isLDMSupported
      boolean isLDMSupported()
      Package:dji.sdk.sdkmanager
      Description:

      true if LDM is supported in the current context. LDM is not supported in China. The SDK locally uses GPS location and MCC (mobile country code) to determine the country of operation. If LDM is not enabled and the internet is accessible, the IP address is also used to determine the country of operation. The default value is true after the first installation.

      Return:
      booleanA bool value to check if LDM is supported.
      Check LDM Enabled
      method
      method isLDMEnabled
      boolean isLDMEnabled()
      Package:dji.sdk.sdkmanager
      Description:

      true if LDM is already enabled.

      Return:
      booleanA boolean value to check if LDM is enabled.
      Enable LDM
      method
      method enableLDM
      @Nullable
      DJIError enableLDM()
      Package:dji.sdk.sdkmanager
      Description:

      Enables LDM. Can only be enabled if isLDMSupported is true. Call this method before calling the other methods of SDK (including registerApp) to restrict the internet access of SDK (SDK registration is unrestricted).

      Return:
      @Nullable DJIErrorThe error occured. NULL if LDM is enabled successfully.
      Disable LDM
      method
      method disableLDM
      void disableLDM()
      Package:dji.sdk.sdkmanager
      Description:

      Disables LDM.

      method setCallback
      void setCallback(LDMCallback ldmCallback)
      Package:dji.sdk.sdkmanager
      Description:

      Sets the LDM callback.

      Input Parameters:
      LDMCallback ldmCallbackThe execution callback with the returned value.
      interface
      interface LDMCallback
      interface LDMCallback
      Package:dji.sdk.sdkmanager
      Description:

      LDM callback interface, callback will always be invoked in background thread.

      Interface Methods:

      Callback Method

      method onLDMEnabledChange
      void onLDMEnabledChange(boolean isEnabled)
      Package:dji.sdk.sdkmanager
      Description:

      Called when the LDM availability is changed.

      Input Parameters:
      boolean isEnabledTRUE if LDM enabled.
      method onLDMSupportedChange
      void onLDMSupportedChange(boolean isSupported)
      Package:dji.sdk.sdkmanager
      Description:

      If the value changes to false, LDM will be disable after 5 minutes

      Input Parameters:
      boolean isSupportedTRUE if LDM is supported.