DJI Mobile SDK Documentation

      class SDKManagerCallback

      interface SDKManagerCallback
      Package:dji.sdk.sdkmanager
      Description:

      Callback interface for SDK manager.

      Class Members:
      SDK Registration
      method
      method onRegister
      void onRegister(DJIError error)
      Package:dji.sdk.sdkmanager
      Description:

      Callback method after the application attempts to register.

      Input Parameters:
      DJIError errorREGISTRATION_SUCCESS if registration is successful.
      method onProductConnect
      void onProductConnect(BaseProduct product)
      Package:dji.sdk.sdkmanager
      SDK Key:ProductKey.CONNECTION
      Description:

      Called when the "product" is connected.

      Input Parameters:
      BaseProduct productProduct object. nil if the USB link or WiFi link between the product and phone is disconnected.
      method onProductDisconnect
      void onProductDisconnect()
      Package:dji.sdk.sdkmanager
      SDK Key:ProductKey.CONNECTION
      Description:

      Called when the "product" is disconnected.

      method onProductChanged
      void onProductChanged(BaseProduct product)
      Package:dji.sdk.sdkmanager
      Description:

      Called when the connected product is changed. The product will be updated when the aircraft connected changes from only remote controller connected.

      Input Parameters:
      BaseProduct productAn instance of BaseProduct.
      method onComponentChange
      void onComponentChange(BaseProduct.ComponentKey key, BaseComponent oldComponent, BaseComponent newComponent)
      Package:dji.sdk.sdkmanager
      SDK Key:ProductKey.CONNECTION
      Description:

      Called when a component object changes. Note: if the component is disconnected, this method will not be called, pls use ComponentListener to listen the disconnect event of any component.

      Input Parameters:
      BaseProduct.ComponentKey keyAn enum value of the ComponentKey.
      BaseComponent oldComponentAn instance of BaseComponent.
      BaseComponent newComponentAn instance of BaseComponent.
      Init Process
      method
      method onInitProcess
      void onInitProcess(DJISDKInitEvent event, int totalProcess)
      Package:dji.sdk.sdkmanager
      Description:

      Called when load sdk resource.

      Input Parameters:
      DJISDKInitEvent eventAn event that show what resource is loading.
      int totalProcessThe totalProcess of load resource, from 0 to 100.
      method onDatabaseDownloadProgress
      void onDatabaseDownloadProgress(long current, long total)
      Package:dji.sdk.sdkmanager
      Description:

      Called when Fly Safe database download progress is updated. Mobile SDK will download the database when registerApp is invoked, if "fly-safe-database" is excluded in build.gradle. Please find onRegister for updated error.

      Input Parameters:
      long currentThe current download data size.
      long totalThe total size of the file being downloaded.