DJI Mobile SDK Documentation

      class KeyTools

      @Keep
      class KeyTools
      Package:dji.sdk.keyvalue.key
      Description:

      Key tool class. DJI encapsulates a series of more concise and easy-to-use methods to create DJIKey instance.

      Supported since MSDK 5.0.0

      Class Members:
      method
      method createKey
      @NonNull
      static <T> DJIKey<T> createKey(DJIKeyInfo<T> mKeyInfo, int productId, int componentIndex, int subComponentType, int subComponentIndex)
      Package:dji.sdk.keyvalue.key
      Description:

      The default method for creating Key instances.

      Supported since MSDK 5.0.0

      Input Parameters:
      DJIKeyInfo<T> mKeyInfoA key interface in DJIKey. For example, CameraKey.KeyCameraType, which represents the key of the camera type.
      int productIdProduct ID of the currently connected device, defaults to 0.
      int componentIndexGimbal load position. Please refer to ComponentIndexType to set the corresponding int value.
      int subComponentTypeCamera lens type. Please refer to CameraLensType to set the corresponding int value.
      int subComponentIndexReserved parameter.
      Return:
      static <T> DJIKey<T>Return instance of DJIKey.
      method
      method createKey
      @NonNull
      static <T> DJIKey<T> createKey(DJIKeyInfo<T> mKeyInfo)
      Package:dji.sdk.keyvalue.key
      Description:

      Create a Key instance by passing a DJIKeyInfo instance of a Key interface. This method is suitable for instance creation of keys that have nothing to do with the gimbal load and camera.

      Supported since MSDK 5.0.0

      Input Parameters:
      DJIKeyInfo<T> mKeyInfoA key interface in DJIKey. For example, FlightControllerKey.KeyAircraftAttitude, which represents the key to get the aircraft attitude.
      Return:
      static <T> DJIKey<T>Return instance of DJIKey.
      method
      method createKey
      @NonNull
      static <T> DJIKey<T> createKey(DJIKeyInfo<T> mKeyInfo, @NonNull ComponentIndexType componentIndexType)
      Package:dji.sdk.keyvalue.key
      Description:

      Create a Key instance by passing in the DJIKeyInfo instance of a Key interface and the load position of the gimbal. This method is suitable for instance creation of keys related to the gimbal load.

      Supported since MSDK 5.0.0

      Input Parameters:
      DJIKeyInfo<T> mKeyInfoA key interface in DJIKey. For example, GimbalKey.KeyGimbalReset, which represents the key to reset the gimbal.
      @NonNull ComponentIndexType componentIndexTypeGimbal load position.
      Return:
      static <T> DJIKey<T>Return instance of DJIKey.
      method createCameraKey
      @NonNull
      static <T> DJIKey<T> createCameraKey(DJIKeyInfo<T> mKeyInfo, ComponentIndexType componentIndexType, CameraLensType cameraLensType)
      Package:dji.sdk.keyvalue.key
      Description:

      Create a Key instance by passing in the DJIKeyInfo instance of a Key interface, camera lens type and the load position of the gimbal. This method is suitable for instance creation of keys related to the camera.

      Supported since MSDK 5.0.0

      Input Parameters:
      DJIKeyInfo<T> mKeyInfoA key interface in DJIKey. For example, CameraKey.KeyCameraType, which represents the key of the camera type.
      ComponentIndexType componentIndexTypeGimbal load position.
      CameraLensType cameraLensTypeCamera lens type.
      Return:
      static <T> DJIKey<T>Return instance of DJIKey.
      method
      method createKey
      @NonNull
      static <T, R> DJIKey.ActionKey<T, R> createKey(DJIActionKeyInfo<T, R> mKeyInfo, int productId, int componentIndex, int subComponentType, int subComponentIndex)
      Package:dji.sdk.keyvalue.key
      Description:

      The default method for creating an ActionKey instance.

      Supported since MSDK 5.0.0

      Input Parameters:
      DJIActionKeyInfo<T, R> mKeyInfoA key interface in DJIKey. For example, CameraKey.KeyCameraType, which represents the key of the camera type.
      int productIdProduct ID of the currently connected device, defaults to 0.
      int componentIndexGimbal load position. Please refer to ComponentIndexType to set the corresponding int value.
      int subComponentTypeCamera lens type. Please refer to CameraLensType to set the corresponding int value.
      int subComponentIndexReserved parameter.
      Return:
      static <T, R> DJIKey.ActionKey<T, R>Return instance of DJIKey.
      method
      method createKey
      @NonNull
      static <T, R> DJIKey.ActionKey<T, R> createKey(DJIActionKeyInfo<T, R> mKeyInfo)
      Package:dji.sdk.keyvalue.key
      Description:

      Create an ActionKey instance by passing in a DJIKeyInfo instance of a Key interface. This method is suitable for instance creation of ActionKey which is not related to gimbal load and camera.

      Supported since MSDK 5.0.0

      Input Parameters:
      DJIActionKeyInfo<T, R> mKeyInfoA key interface in DJIKey. For example, CameraKey.KeyCameraType, which represents the key of the camera type.
      Return:
      static <T, R> DJIKey.ActionKey<T, R>Return instance of DJIKey.
      method
      method createKey
      static <T, R> DJIKey.ActionKey<T, R> createKey(DJIActionKeyInfo<T, R> mKeyInfo, ComponentIndexType componentIndexType)
      Package:dji.sdk.keyvalue.key
      Description:

      Create a Key instance by passing in the DJIKeyInfo instance of an ActionKey interface and the load position of the gimbal. This method is suitable for instance creation of ActionKey related to gimbal load.

      Supported since MSDK 5.0.0

      Input Parameters:
      DJIActionKeyInfo<T, R> mKeyInfoA key interface in DJIKey. For example, CameraKey.KeyCameraType, which represents the key of the camera type.
      ComponentIndexType componentIndexTypeGimbal load position.
      Return:
      static <T, R> DJIKey.ActionKey<T, R>Return instance of DJIKey.
      method createCameraKey
      @NonNull
      static <T, R> DJIKey.ActionKey<T, R> createCameraKey(DJIActionKeyInfo<T, R> mKeyInfo, ComponentIndexType componentIndexType, CameraLensType cameraLensType)
      Package:dji.sdk.keyvalue.key
      Description:

      Create a Key instance by passing in the DJIKeyInfo instance of an ActionKey interface, camera lens type and the load position of the gimbal. This method is suitable for instance creation of ActionKey related to camera.

      Input Parameters:
      DJIActionKeyInfo<T, R> mKeyInfoA key interface in DJIKey. For example, CameraKey.KeyCameraType, which represents the key of the camera type.
      ComponentIndexType componentIndexTypeGimbal load position.
      CameraLensType cameraLensTypeCamera lens type.
      Return:
      static <T, R> DJIKey.ActionKey<T, R>Return instance of DJIKey.
      enum ComponentIndexType
      enum ComponentIndexType implements JNIProguardKeepTag
      Package:dji.sdk.keyvalue.value.common
      Description:

      Gimbal load position.

      Enum Members:
      LEFT_OR_MAINPortside(Main) position.
      RIGHTStarboard position.
      UPUpside location.
      FPVNose(FPV)location.
      Class Members:
      enum CameraLensType
      enum CameraLensType implements JNIProguardKeepTag
      Package:dji.sdk.keyvalue.value.common
      Description:

      Type of camera lens.

      Enum Members:
      CAMERA_LENS_ZOOMZoom lens.
      CAMERA_LENS_WIDEWide lens.
      CAMERA_LENS_THERMALThermal lens.
      CAMERA_LENS_RGBMultispectral RGB lenses.
      CAMERA_LENS_MS_NDVIMultispectral NDVI lenses.
      CAMERA_LENS_MS_GMultispectral G lenses.
      CAMERA_LENS_MS_RMultispectral R lenses.
      CAMERA_LENS_MS_REMultispectral RE lenses.
      CAMERA_LENS_MS_NIRMultispectral NIR lenses.
      CAMERA_LENS_DEFAULTDefault lens. For cameras with only one lens, there is no need to distinguish between zoom, wide or infrared lenses. Use this default lens type.
      Class Members: