DJI Mobile SDK Documentation

      class HandHeld

      class HandHeld extends BaseProduct
      Package:dji.sdk.products
      Inherits From:BaseProduct
      Description:

      Handheld product class, which includes basic product information and access to all components (such as camera, battery etc.). This object is accessed from getProduct in DJISDKManager.

      Class Members:
      Components
      method
      method getHandHeldController
      HandheldController getHandHeldController()
      Package:dji.sdk.products
      Description:

      Returns an instance of the handheld device's handheld controller.

      Return:
      HandheldControllerAn instance of the HandheldController
      Inherited Methods:
      dji.sdk.base.BaseProduct
      method
      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.
      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.
      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.
      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).