DJI Mobile SDK Documentation

      class CommonCallbacks

      @EXClassNullAway
      class CommonCallbacks
      Package:dji.common.util
      Description:

      Interfaces of common callbacks used to return results of asynchronous operations.

      Class Members:
      interface CompletionCallback
      interface CompletionCallback
      Package:dji.common.util
      Description:

      Completion callback for asynchronous operations when no information needs to be returned from the operation.

      Interface Methods:

      Callback Interfaces

      method
      method onResult
      void onResult(DJIError error)
      Package:dji.common.util
      Description:

      Invoked when the asynchronous operation completes. If the operation completes successfully, error will be null. Override to handle in your own code.

      Input Parameters:
      DJIError errorThe DJI error result
      interface CompletionCallbackWith
      interface CompletionCallbackWith<T>
      Package:dji.common.util
      Description:

      Completion callback for asynchronous operations when information that requires one parameter (T) needs to be returned from the operation. The parameter T will be defined where the operation called.

      Interface Methods:

      Callback Interfaces

      method
      method onSuccess
      void onSuccess(T t)
      Package:dji.common.util
      Description:

      Invoked when the asynchronous operation completes successfully. Override to handle in your own code.

      Input Parameters:
      T tThe parameter being returned.
      method
      method onFailure
      void onFailure(DJIError error)
      Package:dji.common.util
      Description:

      Invoked when the asynchronous operation fails to complete normally. Override to handle in your own code.

      Input Parameters:
      DJIError errorThe DJI error result
      interface CompletionCallbackWithTwoParam
      interface CompletionCallbackWithTwoParam<X, Y>
      Package:dji.common.util
      Description:

      Completion callback for asynchronous operations when information that requires two parameters (X, Y) needs to be returned from the operation. The parameters X and Y will be defined where the operation is called.

      Interface Methods:

      Callback Interfaces

      method
      method onSuccess
      void onSuccess(X x, Y y)
      Package:dji.common.util
      Description:

      Invoked when the asynchronous operation completes successfully. Override to handle in your own code.

      Input Parameters:
      X xThe first parameter being returned.
      Y yThe second parameter being returned.
      method
      method onFailure
      void onFailure(DJIError error)
      Package:dji.common.util
      Description:

      Invoked when the asynchronous operation fails to complete normally. Override to handle in your own code.

      Input Parameters:
      DJIError errorThe DJI error result