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
      <Result> Result getValue(DJIKey<Result> 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<Result> keyDJIKey instance.
      Return:
      <Result> ResultReturn DJIValue value.
      method
      method getValue
      @NonNull
      <Result> Result getValue(DJIKey<Result> key, @NonNull Result 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<Result> keyDJIKey instance.
      @NonNull Result defaultValueWhen the MSDK cache value cannot be read, will return the default value.
      Return:
      <Result> ResultReturn DJIValue value.
      method
      method getValue
      <Result> void getValue(DJIKey<Result> key, CommonCallbacks.CompletionCallbackWithParam<Result> 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<Result> keyDJIKey instance.
      CommonCallbacks.CompletionCallbackWithParam<Result> callbackReturn callback of the execution result.
      method
      method setValue
      <Param> void setValue(DJIKey<Param> key, Param param, CommonCallbacks.CompletionCallback callback)
      Package:dji.v5.manager.interfaces
      Description:

      Set the parameter of DJIKey.

      Supported since MSDK 5.0.0

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

      Execute the Action behavior of DJIKey.

      Supported since MSDK 5.0.0

      Input Parameters:
      DJIKey.ActionKey<?, Result> keyDJIKey instance.
      CommonCallbacks.CompletionCallbackWithParam<Result> callbackReturn callback of the execution result.
      method performAction
      <Param, Result> void performAction(DJIKey.ActionKey<Param, Result> key, Param param, CommonCallbacks.CompletionCallbackWithParam<Result> 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<Param, Result> keyDJIKey instance.
      Param paramAction parameter.
      CommonCallbacks.CompletionCallbackWithParam<Result> callbackReturn callback of the execution result.
      method
      method listen
      <Result> void listen(DJIKey<Result> key, Object listenHolder, CommonCallbacks.KeyListener<Result> callback)
      Package:dji.v5.manager.interfaces
      Description:

      Listen to the DJIValue value of DJIKey.

      Supported since MSDK 5.0.0

      Input Parameters:
      DJIKey<Result> keyDJIKey instance.
      Object listenHolderThe holder of the listener.
      CommonCallbacks.KeyListener<Result> callbackReturn callback of the execution result.
      method
      method listen
      <Result> void listen(DJIKey<Result> key, Object listenHolder, boolean getOnce, CommonCallbacks.KeyListener<Result> 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<Result> keyDJIKey instance.
      Object listenHolderThe holder of the listener.
      boolean getOncetrue means that the value is obtained asynchronously once while listening.
      CommonCallbacks.KeyListener<Result> 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