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. You should use registerAppForLDM to register the app. 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. When Local Data Mode is enabled, the UTMISSManager will not report flight dynamic data to the UTMISS server.

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

      true if LDM is supported in the current context. 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.
      Get LDM Supported
      method
      method getLDMSupported
      void getLDMSupported(CommonCallbacks.CompletionCallbackWith<Boolean> callback)
      Package:dji.sdk.sdkmanager
      Description:

      true if LDM is supported. The SDK will get whether your app supports LDM from the remote server.

      Input Parameters:
      CommonCallbacks.CompletionCallbackWith<Boolean> callbackThe execution callback.
      Enable LDM
      method
      method enableLDM
      @Nullable
      void enableLDM(CommonCallbacks.CompletionCallback callback)
      Package:dji.sdk.sdkmanager
      Description:

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

      Input Parameters:
      CommonCallbacks.CompletionCallback callbackThe execution callback.
      Return:
      @Nullable voidThe error occurred. NULL if LDM is enabled successfully.
      Disable LDM
      method
      method disableLDM
      void disableLDM()
      Package:dji.sdk.sdkmanager
      Description:

      Disables LDM.

      Network Service
      method
      method setModuleNetworkServiceEnabled
      DJIError setModuleNetworkServiceEnabled(LDMModule... modules)
      Package:dji.sdk.sdkmanager
      Description:

      In LDM mode, You can use this interface to enable network service of the selected module.

      Input Parameters:
      LDMModule... modulesThe array of the modules need to be enabled.
      method isModuleNetworkServiceEnabled
      boolean isModuleNetworkServiceEnabled(@NonNull LDMModuleType moduleType)
      Package:dji.sdk.sdkmanager
      Description:

      true if the network service of the module is enabled.

      Input Parameters:
      @NonNull LDMModuleType moduleTypeThe type of module that needs to be checked.
      Return:
      booleantrue if the network service of the module is enabled.
      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.