DJI Mobile SDK Documentation

      class IDisconnectActionManager

      interface IDisconnectActionManager 
      Package:dji.open.pilot.client.interfaces
      Description:

      Interface for registering the disconnect Action execution of a plugin.

      Supported since MSDK 5.20.1

      Class Members:
      method addSetValueAction
      <P> void addSetValueAction(@NonNull DJIKey<P> key, @Nullable P param)
      Package:dji.open.pilot.client.interfaces
      Description:

      Adds a “setValue on disconnect” operation to the pending registration list.

      Supported since MSDK 5.20.1

      Input Parameters:
      @NonNull DJIKey<P> keyThe Key to operate on.
      @Nullable P paramThe target value for setValue; pass null when there is no parameter.
      method addPerformAction
      <P, R> void addPerformAction(@NonNull DJIKey.ActionKey<P, R> key, @Nullable P param)
      Package:dji.open.pilot.client.interfaces
      Description:

      Adds a “performAction on disconnect” operation to the pending registration list.

      Supported since MSDK 5.20.1

      Input Parameters:
      @NonNull DJIKey.ActionKey<P, R> keyThe ActionKey to operate on.
      @Nullable P paramThe input parameter for performAction; pass null when there is no parameter.
      method registerDisconnectKeyActions
      void registerDisconnectKeyActions(@NonNull CommonCallbacks.CompletionCallback callback)
      Package:dji.open.pilot.client.interfaces
      Description:

      Submits the current pending operation list to the server, fully replacing the existing records.

      Supported since MSDK 5.20.1

      Input Parameters:
      @NonNull CommonCallbacks.CompletionCallback callbackRegistration result callback (called back on the main thread).
      method clearPendingActions
      void clearPendingActions()
      Package:dji.open.pilot.client.interfaces
      Description:

      Clears the local pending operation list (does not affect records already registered on the server). If you need to clear the server-side records at the same time, please call this method and then perform the server-side clearing.

      Supported since MSDK 5.20.1

      enum DisconnectKeyActionType
      enum DisconnectKeyActionType 
      Package:dji.open.pilot.base.disconnectaction
      Description:

      The execution type of the disconnect Key operation, which determines which method of IKeyManager is called when the server executes it.

      Supported since MSDK 5.20.1

      Enum Members:
      SET_VALUESets the value of the Key, corresponding to IKeyManager.setValue. Applicable to: restoring device parameters to default values on disconnect. Example: setting the return-to-home altitude back to 100m.
      PERFORM_ACTIONTriggers the Action of the Key, corresponding to IKeyManager.performAction. Applicable to: executing a certain operation command on disconnect. Example: canceling a waypoint mission that is being executed.
      Class Members: