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.
@NonNull final CommonCallbacks .CompletionCallbackWith<String> callback The execution callback with the returned execution result.
method getUserAccountState
@NonNull UserAccountState getUserAccountState ()
Package: dji.sdk.useraccount
Description:
Gets the DJI user account state.
Return:
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.
@NonNull Context context The android activity's or view's context. @Nullable final CommonCallbacks .CompletionCallbackWith<UserAccountState > callback The 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.
@Nullable CommonCallbacks .CompletionCallback callback The 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.
method removeUserAccountStateChangeListener
void removeUserAccountStateChangeListener (UserAccountStateChangeListener listener)
Package: dji.sdk.useraccount
Description:
Remove the listener.
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: