DJI Mobile SDK Documentation

      class UserAccountManager

      class UserAccountManager
      Package:dji.sdk.useraccount
      Description:

      Class used to manage the DJI account.

      Class Members:
      method getLoggedInDJIUserAccountName
      void getLoggedInDJIUserAccountName(@NonNull final CommonCallbacks.CompletionCallbackWith<String> callback)
      Package:dji.sdk.useraccount
      Description:

      The name of the currently logged in user account.

      Input Parameters:
      @NonNull final CommonCallbacks.CompletionCallbackWith<String> callbackThe execution callback with the returned execution result.
      method getUserAccountState
      @NonNull
      UserAccountState getUserAccountState()
      Package:dji.sdk.useraccount
      Description:

      Gets the DJI user account state.

      Return:
      UserAccountStateAn enum value of UserAccountState.
      method logIntoDJIUserAccount
      void logIntoDJIUserAccount(@NonNull Context context,
      @Nullable
      final CommonCallbacks.CompletionCallbackWith<UserAccountState> callback)
      Package:dji.sdk.useraccount
      Description:

      After invoking this method, a dialog redirecting users to log into their DJI account will be shown. For users outside of China, authorization is required to unlock authorization zones. After the login process, if authorizationRequired is true, and the user is currently out of China and the account has not been authorized to unlock authorization zones, the dialog will then redirect users to authorize their account.

      Input Parameters:
      @NonNull Context contextThe android activity's or view's context.
      @Nullable final CommonCallbacks.CompletionCallbackWith<UserAccountState> callbackThe execution callback with the returned execution result.
      method logoutOfDJIUserAccount
      void logoutOfDJIUserAccount(@Nullable CommonCallbacks.CompletionCallback callback)
      Package:dji.sdk.useraccount
      Description:

      Logs out the DJI user that is logged in.

      Input Parameters:
      @Nullable CommonCallbacks.CompletionCallback callbackThe completion callback with the returned execution result.
      method addUserAccountStateChangeListener
      void addUserAccountStateChangeListener(UserAccountStateChangeListener listener)
      Package:dji.sdk.useraccount
      Description:

      Start listen to the update of the user account state.

      Input Parameters:
      UserAccountStateChangeListener listenerA UserAccountStateChangeListener interface.
      method removeUserAccountStateChangeListener
      void removeUserAccountStateChangeListener(UserAccountStateChangeListener listener)
      Package:dji.sdk.useraccount
      Description:

      Remove the listener.

      Input Parameters:
      UserAccountStateChangeListener listenerA UserAccountStateChangeListener interface.
      Account Information
      class
      enum UserAccountState
      @EXClassNullAway
      enum UserAccountState
      Package:dji.common.useraccount
      Description:

      User account status. Users need to be logged in.

      Enum Members:
      NOT_LOGGED_INUser is not logged in. User needs to be logged in to retrieve currently unlocked, and unlock authorization zones.
      NOT_AUTHORIZEDUser is logged in but has not been authorized to unlock authorization zones.
      AUTHORIZEDUser is logged in and has been authorized to unlock authorization zones.
      TOKEN_OUT_OF_DATEThe token of the user account is out of date.
      UNKNOWNUnknown.
      Class Members: