DJI Mobile SDK Documentation

      class IPayloadManager

      interface IPayloadManager
      Package:dji.v5.manager.interfaces
      Description:

      The payload management class provides functions such as get payload information, get and set widget information, and data receiving and sending.

      Supported since MSDK 5.2.0

      Class Members:
      method addPayloadBasicInfoListener
      void addPayloadBasicInfoListener(@NonNull PayloadBasicInfoListener listener)
      Package:dji.v5.manager.interfaces
      Description:

      Sets the listener of paylaod basic information.

      Supported since MSDK 5.2.0

      Input Parameters:
      @NonNull PayloadBasicInfoListener listenerListener of payload basic information.
      method removePayloadBasicInfoListener
      void removePayloadBasicInfoListener(@NonNull PayloadBasicInfoListener listener)
      Package:dji.v5.manager.interfaces
      Description:

      Remove the listener of paylaod basic information.

      Supported since MSDK 5.2.0

      Input Parameters:
      @NonNull PayloadBasicInfoListener listenerListener of payload basic information.
      method clearAllPayloadBasicInfoListener
      void clearAllPayloadBasicInfoListener()
      Package:dji.v5.manager.interfaces
      Description:

      Remove all the listeners of paylaod basic information.

      Supported since MSDK 5.2.0

      method addPayloadWidgetInfoListener
      void addPayloadWidgetInfoListener(@NonNull PayloadWidgetInfoListener listener)
      Package:dji.v5.manager.interfaces
      Description:

      Sets the listener of widget information.

      Supported since MSDK 5.2.0

      Input Parameters:
      @NonNull PayloadWidgetInfoListener listenerListener of widget information.
      method removePayloadWidgetInfoListener
      void removePayloadWidgetInfoListener(@NonNull PayloadWidgetInfoListener listener)
      Package:dji.v5.manager.interfaces
      Description:

      Remove the listener of widget information.

      Supported since MSDK 5.2.0

      Input Parameters:
      @NonNull PayloadWidgetInfoListener listenerListener of widget information.
      method clearAllPayloadWidgetInfoListener
      void clearAllPayloadWidgetInfoListener()
      Package:dji.v5.manager.interfaces
      Description:

      Remove all the listeners of widget information.

      Supported since MSDK 5.2.0

      method addPayloadDataListener
      void addPayloadDataListener(@NonNull final PayloadDataListener listener)
      Package:dji.v5.manager.interfaces
      Description:

      Sets the listener of payload data.

      Supported since MSDK 5.2.0

      Input Parameters:
      @NonNull final PayloadDataListener listenerListener of payload data.
      method removePayloadDataListener
      void removePayloadDataListener(@NonNull PayloadDataListener listener)
      Package:dji.v5.manager.interfaces
      Description:

      Remove the listener of payload data.

      Supported since MSDK 5.2.0

      Input Parameters:
      @NonNull PayloadDataListener listenerListener of payload data.
      method clearAllPayloadDataListener
      void clearAllPayloadDataListener()
      Package:dji.v5.manager.interfaces
      Description:

      Remove all the listeners of payload data.

      Supported since MSDK 5.2.0

      method pullWidgetInfoFromPayload
      void pullWidgetInfoFromPayload(@NonNull CommonCallbacks.CompletionCallback callback)
      Package:dji.v5.manager.interfaces
      Description:

      Pull widget information from the payload. After the aircraft is successfully connected to the payload, the MSDK will pull the widget information from the payload once by default. You can call the addPayloadWidgetInfoListener to get the widget information. If the listener does not have any callback information, you can try to call this interface to retrieve the widget information from the payload.

      Supported since MSDK 5.2.0

      Input Parameters:
      @NonNull CommonCallbacks.CompletionCallback callbackReturn the callback of execution result.
      method setWidgetValue
      void setWidgetValue(@NonNull WidgetValue value, @NonNull final CommonCallbacks.CompletionCallback callback)
      Package:dji.v5.manager.interfaces
      Description:

      Sets the value for different widget types in the payload.

      Supported since MSDK 5.2.0

      Input Parameters:
      @NonNull WidgetValue valueThe widget value that needs to be set.
      @NonNull final CommonCallbacks.CompletionCallback callbackReturn the callback of execution result.
      method sendDataToPayload
      void sendDataToPayload(byte[] data, @NonNull final CommonCallbacks.CompletionCallback callback)
      Package:dji.v5.manager.interfaces
      Description:

      Send command data to the payload. The maximum bandwidth of this channel is 3KBytes/s.

      Supported since MSDK 5.2.0

      Input Parameters:
      byte[] dataData to be sent to the payload.
      @NonNull final CommonCallbacks.CompletionCallback callbackReturn the callback of execution result.
      enum WidgetType
      enum WidgetType implements JNIProguardKeepTag
      Package:dji.sdk.keyvalue.value.payload
      Description:

      Widget type.

      Supported since MSDK 5.2.0

      Enum Members:
      BUTTONButton widget, usually the default value is 0. When the button is pressed, the widget value will change to 1.
      SWITCHSwitch widget, when the switch status is "ON", the widget value will be 1, when the switch status is "OFF", the widget value will change to 0.
      RANGERange widget, which can return widget value in the range of [0,100].
      LISTList widget, which can return an int value in the range of [0, N]. N is determined by the firmware of the third-party payload device manufacturer. The number of sub items returned by the getSubItems method in PayloadWidget will be N+1.
      INPUTInput widget,which can be set to any int value, and the default value is determined by the firmware of the payload equipment manufacturer.
      Class Members:
      enum PayloadType
      enum PayloadType implements JNIProguardKeepTag
      Package:dji.sdk.keyvalue.value.payload
      Description:

      Payload type.

      Supported since MSDK 5.2.0

      Enum Members:
      SKYPORT_1SkyPort 1.0。
      SKYPORT_2SkyPort 2.0。
      X_PORTXPort(SkyPort2.0 + Standard gimbal).
      Class Members:
      enum PayloadProductPhaseType
      enum PayloadProductPhaseType implements JNIProguardKeepTag
      Package:dji.sdk.keyvalue.value.payload
      Description:

      负载产品阶段。

      Supported since MSDK 5.2.0

      Enum Members:
      PHASE_DEVELOPMENTDevelopment phase.
      PHASE_RELEASERelease phase.
      Class Members: