DJI Mobile SDK Documentation

      class IUserAccountManager

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

      The class to manage user account. It is used to login and logout DJI account. When using chihiro network RTK, this interface should be called to login DJI account.

      Supported since MSDK 5.0.0

      Class Members:
      method getLoginInfo
      @NonNull
      LoginInfo getLoginInfo()
      Package:dji.v5.manager.interfaces
      Description:

      Get current login information, including login status and login account.

      Supported since MSDK 5.0.0

      Return:
      LoginInfoReturn current login information.
      method logInDJIUserAccount
      void logInDJIUserAccount(FragmentActivity fragmentActivity, boolean isFullScreen, @Nullable CommonCallbacks.CompletionCallback callback)
      Package:dji.v5.manager.interfaces
      Description:

      Login the DJI account by calling the login UI. When the LoginState is NOT_LOGGED_IN or TOKEN_OUT_OF_DATE, this interface should be called to login account.

      Supported since MSDK 5.0.0

      Input Parameters:
      FragmentActivity fragmentActivityfragmentActivity
      boolean isFullScreentrue means that display the login box in full screen.
      @Nullable CommonCallbacks.CompletionCallback callbackReturn the callback of execution result.
      method logInDJIUserAccount
      void logInDJIUserAccount(@NonNull String userName, @NonNull String password, @Nullable String verificationCode,
      @Nullable CommonCallbacks.CompletionCallback callback)
      Package:dji.v5.manager.interfaces
      Description:

      Login the DJI account by calling interface. This interface can be used in unmanned scenarios, such as nest applications. When the LoginState is NOT_LOGGED_IN or TOKEN_OUT_OF_DATE, this interface should be called to login account.
      Note:
      After the login fails, if the callback of this interface returns an error of Login, it means that the verification code needs to be entered when you login again. Please call getVerificationCodeImageURL to get the image verification code.


      Supported since MSDK 5.3.0

      Input Parameters:
      @NonNull String userNameLogin user name
      @NonNull String passwordLogin password
      @Nullable String verificationCodeLogin verification code
      @Nullable CommonCallbacks.CompletionCallback callbackReturn the callback of execution result.
      method getVerificationCodeImageURL
      String getVerificationCodeImageURL()
      Package:dji.v5.manager.interfaces
      Description:

      Get the webpage link of the image verification code, you can visit this link to get the image verification code.

      Supported since MSDK 5.3.0

      Return:
      StringReturns the link to the webpage where the verification code is obtained.
      method logOutDJIUserAccount
      void logOutDJIUserAccount(@Nullable CommonCallbacks.CompletionCallback callback)
      Package:dji.v5.manager.interfaces
      Description:

      Logout the DJI account.

      Supported since MSDK 5.0.0

      Input Parameters:
      @Nullable CommonCallbacks.CompletionCallback callbackReturn the callback of execution result.
      method addLoginInfoUpdateListener
      void addLoginInfoUpdateListener(@NonNull LoginInfoUpdateListener listener)
      Package:dji.v5.manager.interfaces
      Description:

      Add the listener of login information.

      Supported since MSDK 5.0.0

      Input Parameters:
      @NonNull LoginInfoUpdateListener listenerListener of login information.
      method removeLoginInfoUpdateListener
      void removeLoginInfoUpdateListener(@NonNull LoginInfoUpdateListener listener)
      Package:dji.v5.manager.interfaces
      Description:

      Remove the listener of login information.

      Supported since MSDK 5.0.0

      Input Parameters:
      @NonNull LoginInfoUpdateListener listenerListener of login information.
      method clearAllLoginInfoUpdateListener
      void clearAllLoginInfoUpdateListener()
      Package:dji.v5.manager.interfaces
      Description:

      Remove all the listener of login information.

      Supported since MSDK 5.0.0

      enum LoginState
      enum LoginState
      Package:dji.v5.manager.account
      Description:

      Login status.

      Supported since MSDK 5.0.0

      Enum Members:
      NOT_LOGGED_INNot logged in.
      LOGGED_INLogged in.
      TOKEN_OUT_OF_DATELogin expired.
      Class Members: