DJI Mobile SDK Documentation

      class BaseProduct

      class BaseProduct
      Package:dji.sdk.base
      Description:

      Abstract class for all DJI Products. Aircraft and HandHeld objects are subclasses of BaseProduct and can be accessed from getProduct in DJISDKManager. Additional components can be found in Aircraft and HandHeld that are unique to those products only.

      Class Members:
      method setDiagnosticsInformationCallback
      void setDiagnosticsInformationCallback(DiagnosticsInformationCallback callback)
      Package:dji.sdk.base
      Description:

      Sets up the diagnostics list update callback.

      Input Parameters:
      DiagnosticsInformationCallback callbackThe callback of DiagnosticsInformationCallback.
      Information
      method
      method getFirmwarePackageVersion
      String getFirmwarePackageVersion()
      Package:dji.sdk.base
      SDK Key:ProductKey.FIRMWARE_PACKAGE_VERSION
      Description:

      Gets the product's firmware package version. Products other than Phantom 4, Phantom 4 Pro, Mavic Pro, and Inspire 2, require internet connection. The execution time for this method depends on the speed of internet connectivity.

      Return:
      StringThe product's firmware package version string.
      method
      method setName
      void setName(@NonNull String name, @Nullable final CommonCallbacks.CompletionCallback callback)
      Package:dji.sdk.base
      Description:

      Retrieves the model of the product.

      Input Parameters:
      @NonNull String nameName to be set to the aircraft.
      @Nullable final CommonCallbacks.CompletionCallback callbackAsynchronous execution result.
      method
      method getName
      void getName(final CommonCallbacks.CompletionCallbackWith<String> callback)
      Package:dji.sdk.base
      Description:

      Retrieves the model of the product.

      Input Parameters:
      final CommonCallbacks.CompletionCallbackWith<String> callbackThe execution callback with the returned value.
      method
      method getModel
      Model getModel()
      Package:dji.sdk.base
      SDK Key:ProductKey.MODEL_NAME
      Description:

      Retrieves the model of the product. See Aircraft and HandHeld for the possible strings that can be returned.

      Return:
      ModelThe model of the product.
      Connectivity
      method
      method isConnected
      boolean isConnected()
      Package:dji.sdk.base
      SDK Key:ProductKey.CONNECTION
      Description:

      true if the device is connected.

      Return:
      booleantrue if the device is connected.
      Components
      method
      method getCamera
      Camera getCamera()
      Package:dji.sdk.base
      Description:

      Retrieves an instance of the device's camera. Only supported by the product with single gimbal, except Zenmuse XT2 and Mavic 2 Enterprise Camera.

      Return:
      CameraAn instance of the aircraft's camera.
      method getBattery
      Battery getBattery()
      Package:dji.sdk.base
      Description:

      Retrieves an instance of the product's smart battery. When using products with multiple batteries, such as the M600 or Inspire 2, use getBatteries, as this method will only return a single battery.

      Return:
      BatteryAn instance of the aircraft's smart battery.
      method getBatteries
      synchronized List<Battery> getBatteries()
      Package:dji.sdk.base
      Description:

      Returns an array of aircraft's batteries. It is used when the aircraft has multiple batteries, e.g. Matrice 600.

      Return:
      synchronized List<Battery>A List of Battery objects.
      method
      method getGimbal
      Gimbal getGimbal()
      Package:dji.sdk.base
      Description:

      Retrieves an instance of the device's gimbal.

      Return:
      GimbalAn instance of the aircraft's gimbal.
      method getAccessoryAggregation
      @Nullable
      AccessoryAggregation getAccessoryAggregation()
      Package:dji.sdk.base
      Description:

      Retrieves an instance of the accessory aggregation.

      Return:
      AccessoryAggregation'NULL' if the product does not support accessories (e.g. spotlight, speaker or beacon).
      enum ComponentKey
      enum ComponentKey
      Package:dji.sdk.base
      Description:

      Specifies all the components.

      Enum Members:
      CAMERACamera component.
      GIMBALGimbal component.
      REMOTE_CONTROLLERRemote Controller component.
      FLIGHT_CONTROLLERFlight Controller component.
      BATTERYBattery component.
      HAND_HELD_CONTROLLERHandheld Controller component.
      AIR_LINKAirLink component.
      MOBILE_REMOTE_CONTROLLERMobile remote controller component.
      ACCESSORY_AGGREGATIONAccessory aggregation component.
      BASE_STATIONThe RTK base station component.
      RADARThe Radar component.
      LIDARThe Lidar component.
      Class Members:
      enum
      enum Model
      @EXClassNullAway
      @Keep
      enum Model
      Package:dji.common.product
      SDK Key:ProductKey.MODEL_NAME
      Description:

      Class containing all product strings.

      Enum Members:
      UNKNOWN_AIRCRAFTThe Aircraft's model name is unknown.
      INSPIRE_1The aircraft's model name is Inspire 1.
      INSPIRE_1_PROThe aircraft's model name is Inspire 1 Pro.
      INSPIRE_1_RAWThe aircraft's model name is Inspire 1 Raw.
      INSPIRE_2The aircraft's model name is Inspire 2.
      PHANTOM_3_PROFESSIONALThe aircraft's model name is Phantom 3 Professional.
      PHANTOM_3_ADVANCEDThe aircraft's model name is Phantom 3 Advanced.
      PHANTOM_3_STANDARDThe aircraft's model name is Phantom 3 Standard.
      Phantom_3_4KThe aircraft's model name is Phantom 3 4K.
      PHANTOM_4The aircraft's model name is Phantom 4.
      PHANTOM_4_PROThe aircraft's model name is Phantom 4 Pro.
      PHANTOM_4_PRO_V2The aircraft's model name is Phantom 4 Pro V2.
      P_4_MULTISPECTRALThe aircraft's model name is P4 Multispectral.
      MAVIC_AIR_2The aircraft's model name is Mavic Air 2.
      DJI_MINI_SEThe aircraft's model name is DJI Mini SE.
      DJI_MINI_2The aircraft's model name is DJI Mini 2.
      MAVIC_2_ENTERPRISE_ADVANCEDThe aircraft's model name is Mavic 2 Enterprise Advanced.
      MATRICE_100The aircraft's model name is Matrice 100.
      MATRICE_600The aircraft's model name is Matrice 600.
      MATRICE_600_PROThe aircraft's model name is Matrice 600 Pro.
      A3The aircraft flight controller's model name is A3.
      MAVIC_PROThe aircraft's model name is Mavic Pro.
      SparkThe aircraft's model name is Spark.
      MATRICE_210The aircraft's model name is Matrice 210.
      MATRICE_210_RTKThe aircraft's model name is Matrice 210 RTK.
      MATRICE_200_V2The aircraft's model name is Matrice 200 V2.
      MATRICE_210_V2The aircraft's model name is Matrice 210 V2.
      MATRICE_210_RTK_V2The aircraft's model name is Matrice 210 RTK V2.
      MATRICE_300_RTKThe aircraft's model name is Matrice 300 RTK.
      MAVIC_AIRThe aircraft's model name is Mavic Air.
      MAVIC_2_PROThe aircraft's model name is Mavic 2 Pro.
      MAVIC_2_ZOOMThe aircraft's model name is Mavic 2 Zoom.
      MAVIC_2The aircraft's model name is either Mavic 2 Pro or Mavic 2 Zoom. The camera is not recognized yet.
      MAVIC_2_ENTERPRISEThe aircraft's model name is Mavic 2 Enterprise.
      MAVIC_2_ENTERPRISE_DUALThe aircraft's model name is Mavic 2 Enterprise Dual.
      MAVIC_MINIThe aircraft's model name is Mavic Mini.
      DJI_AIR_2SThe aircraft's model name is DJI Air 2S.
      N3The aircraft flight controller's model name is N3.
      UNKNOWN_HANDHELDHandheld device model name unknown.
      OSMOHandheld device model name Osmo.
      OSMO_PROHandheld device model name Osmo Pro.
      OSMO_RAWHandheld device model name Osmo RAW.
      OSMO_MOBILEHandheld device model name Osmo Mobile.
      OSMO_PLUSHandheld device model name Osmo+.
      OSMO_MOBILE_2Handheld device model name Osmo Mobile 2.
      Class Members: