DJI Mobile SDK Documentation

      class IKeyManager

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

      The class to manage the MSDK keys, MSDK provides a series of methods to access and control the parameters and behaviors of the hardware module which include the set and get method of a DJIKeyvalue. Also they include the listener and action of theDJIKeyvalue. You can use createKey method fromKeyToolsclass to create an instance of DJIKey more easily.

      Supported since MSDK 5.0.0

      Class Members:
      method
      method getValue
      @Nullable
      <R> R getValue(DJIKey<R> key)
      Package:dji.v5.manager.interfaces
      Description:

      Obtain the DJIValue value of the DJIKey synchronously, which is the value obtained from the MSDK cache. To get the value asynchronously from the hardware device, please call getValue.

      Supported since MSDK 5.0.0

      Input Parameters:
      DJIKey<R> keyDJIKey instance.
      Return:
      <R> RReturn DJIValue value.
      method
      method getValue
      @NonNull
      <R> R getValue(DJIKey<R> key, @NonNull R defaultValue)
      Package:dji.v5.manager.interfaces
      Description:

      Obtain the DJIValue value of the DJIKey synchronously, which is the value obtained from the MSDK cache. If the value cannot be read, the set defaultValue will be returned. To get the value asynchronously from the hardware device, please call getValue.

      Supported since MSDK 5.0.0

      Input Parameters:
      DJIKey<R> keyDJIKey instance.
      @NonNull R defaultValueWhen the MSDK cache value cannot be read, will return the default value.
      Return:
      <R> RReturn DJIValue value.
      method
      method getValue
      <R> void getValue(DJIKey<R> key, CommonCallbacks.CompletionCallbackWithParam<R> callback)
      Package:dji.v5.manager.interfaces
      Description:

      Get the DJIValue value of DJIKey asynchronously, which is the value obtained from the hardware device. To read the value from the MSDK cache, please call getValue.

      Supported since MSDK 5.0.0

      Input Parameters:
      DJIKey<R> keyDJIKey instance.
      CommonCallbacks.CompletionCallbackWithParam<R> callbackReturn callback of the execution result.
      method
      method setValue
      <P> void setValue(DJIKey<P> key, P param, CommonCallbacks.CompletionCallback callback)
      Package:dji.v5.manager.interfaces
      Description:

      Set the parameter of DJIKey.

      Supported since MSDK 5.0.0

      Input Parameters:
      DJIKey<P> keyDJIKey instance.
      P paramParameter set.
      CommonCallbacks.CompletionCallback callbackReturn callback of the execution result.
      method performAction
      <R> void performAction(DJIKey.ActionKey<?, R> key, CommonCallbacks.CompletionCallbackWithParam<R> callback)
      Package:dji.v5.manager.interfaces
      Description:

      Execute the Action behavior of DJIKey.

      Supported since MSDK 5.0.0

      Input Parameters:
      DJIKey.ActionKey<?, R> keyDJIKey instance.
      CommonCallbacks.CompletionCallbackWithParam<R> callbackReturn callback of the execution result.
      method performAction
      <P, R> void performAction(DJIKey.ActionKey<P, R> key, P param, CommonCallbacks.CompletionCallbackWithParam<R> callback)
      Package:dji.v5.manager.interfaces
      Description:

      Execute the Action behavior of DJIKey with parameters.

      Supported since MSDK 5.0.0

      Input Parameters:
      DJIKey.ActionKey<P, R> keyDJIKey instance.
      P paramAction parameter.
      CommonCallbacks.CompletionCallbackWithParam<R> callbackReturn callback of the execution result.
      method
      method listen
      <R> void listen(DJIKey<R> key, Object listenHolder, CommonCallbacks.KeyListener<R> callback)
      Package:dji.v5.manager.interfaces
      Description:

      Listen to the DJIValue value of DJIKey.

      Supported since MSDK 5.0.0

      Input Parameters:
      DJIKey<R> keyDJIKey instance.
      Object listenHolderThe holder of the listener.
      CommonCallbacks.KeyListener<R> callbackReturn callback of the execution result.
      method
      method listen
      <R> void listen(DJIKey<R> key, Object listenHolder, boolean getOnce, CommonCallbacks.KeyListener<R> callback)
      Package:dji.v5.manager.interfaces
      Description:

      Listen to the DJIValue value of DJIKey. While listening, the DJIValue value can be obtained asynchronously once.

      Supported since MSDK 5.0.0

      Input Parameters:
      DJIKey<R> keyDJIKey instance.
      Object listenHolderThe holder of the listener.
      boolean getOncetrue means that the value is obtained asynchronously once while listening.
      CommonCallbacks.KeyListener<R> callbackReturn callback of the execution result.
      method cancelListen
      void cancelListen(DJIKey<?> key, Object listenHolder)
      Package:dji.v5.manager.interfaces
      Description:

      Cancel the listening of specific DJIKey and specific listenHolder.

      Supported since MSDK 5.0.0

      Input Parameters:
      DJIKey<?> keyDJIKey instance.
      Object listenHolderThe holder of the listener.
      method cancelListen
      void cancelListen(DJIKey<?> key)
      Package:dji.v5.manager.interfaces
      Description:

      Cancel the listening of specific DJIKey.

      Supported since MSDK 5.0.0

      Input Parameters:
      DJIKey<?> keyDJIKey instance.
      method cancelListen
      void cancelListen(Object listenHolder)
      Package:dji.v5.manager.interfaces
      Description:

      Cancels all listeners for a specific Holder.

      Supported since MSDK 5.0.0

      Input Parameters:
      Object listenHolderHolder Listener.
      class