Java android.accounts AccountManager fields, constructors, methods, implement or subclass

Example usage for Java android.accounts AccountManager fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for android.accounts AccountManager.

The text is from its open source code.

Field

intERROR_CODE_CANCELED
StringKEY_ACCOUNT_NAME
Bundle key used for the String account name in results from methods which return information about a particular account.
StringKEY_ACCOUNT_TYPE
Bundle key used for the String account type in results from methods which return information about a particular account.
StringKEY_AUTHTOKEN
Bundle key used for the auth token value in results from #getAuthToken and friends.
StringKEY_INTENT
Bundle key used for an Intent in results from methods that may require the caller to interact with the user.
StringKEY_PASSWORD
Bundle key used to supply the password directly in options to #confirmCredentials , rather than prompting the user with the standard password prompt.
StringKEY_ACCOUNT_AUTHENTICATOR_RESPONSE
StringKEY_AUTH_FAILED_MESSAGE
StringKEY_BOOLEAN_RESULT
StringKEY_ERROR_CODE
StringKEY_ERROR_MESSAGE
StringKEY_USERDATA
StringKEY_CALLER_UID
The UID of caller app.
StringLOGIN_ACCOUNTS_CHANGED_ACTION
Action sent as a broadcast Intent by the AccountsService when accounts are added, accounts are removed, or an account's credentials (saved password, etc) are changed.

Method

AccountManagerFutureaddAccount(final String accountType, final String authTokenType, final String[] requiredFeatures, final Bundle addAccountOptions, final Activity activity, AccountManagerCallback callback, Handler handler)
Asks the user to add an account of a specified type.
booleanaddAccountExplicitly(Account account, String password, Bundle userdata)
Adds an account directly to the AccountManager.
voidaddOnAccountsUpdatedListener(final OnAccountsUpdateListener listener, Handler handler, boolean updateImmediately)
Adds an OnAccountsUpdateListener to this instance of the AccountManager .
StringblockingGetAuthToken(Account account, String authTokenType, boolean notifyAuthFailure)
This convenience helper synchronously gets an auth token with #getAuthToken(Account,String,boolean,AccountManagerCallback,Handler) .
voidclearPassword(final Account account)
Forgets a saved password.
AccountManagerFutureconfirmCredentials(final Account account, final Bundle options, final Activity activity, final AccountManagerCallback callback, final Handler handler)
Confirms that the user knows the password for an account to make extra sure they are the owner of the account.
AccountManagerget(Context context)
Gets an AccountManager instance associated with a Context.
Account[]getAccounts()
Lists all accounts visible to the caller regardless of type.
Account[]getAccountsByType(String type)
Lists all accounts of particular type visible to the caller.
AccountManagerFuturegetAccountsByTypeAndFeatures(final String type, final String[] features, AccountManagerCallback callback, Handler handler)
Lists all accounts of a type which have certain features.
AuthenticatorDescription[]getAuthenticatorTypes()
Lists the currently registered authenticators.
AccountManagerFuturegetAuthToken(final Account account, final String authTokenType, final boolean notifyAuthFailure, AccountManagerCallback callback, Handler handler)
Gets an auth token of the specified type for a particular account, optionally raising a notification if the user must enter credentials.
AccountManagerFuturegetAuthToken(final Account account, final String authTokenType, final Bundle options, final Activity activity, AccountManagerCallback callback, Handler handler)
Gets an auth token of the specified type for a particular account, prompting the user for credentials if necessary.
AccountManagerFuturegetAuthToken(final Account account, final String authTokenType, final Bundle options, final boolean notifyAuthFailure, AccountManagerCallback callback, Handler handler)
Gets an auth token of the specified type for a particular account, optionally raising a notification if the user must enter credentials.
AccountManagerFuturegetAuthTokenByFeatures(final String accountType, final String authTokenType, final String[] features, final Activity activity, final Bundle addAccountOptions, final Bundle getAuthTokenOptions, final AccountManagerCallback callback, final Handler handler)
This convenience helper combines the functionality of #getAccountsByTypeAndFeatures , #getAuthToken , and #addAccount .
StringgetPassword(final Account account)
Gets the saved password associated with the account.
StringgetUserData(final Account account, final String key)
Gets the user data named by "key" associated with the account.
voidinvalidateAuthToken(final String accountType, final String authToken)
Removes an auth token from the AccountManager's cache.
IntentnewChooseAccountIntent(Account selectedAccount, ArrayList allowableAccounts, String[] allowableAccountTypes, boolean alwaysPromptForAccount, String descriptionOverrideText, String addAccountAuthTokenType, String[] addAccountRequiredFeatures, Bundle addAccountOptions)
Deprecated in favor of #newChooseAccountIntent(Account,List,String[],String,String,String[],Bundle) .
IntentnewChooseAccountIntent(Account selectedAccount, List allowableAccounts, String[] allowableAccountTypes, String descriptionOverrideText, String addAccountAuthTokenType, String[] addAccountRequiredFeatures, Bundle addAccountOptions)
Returns an intent to an Activity that prompts the user to choose from a list of accounts.
booleannotifyAccountAuthenticated(Account account)
Notifies the system that the account has just been authenticated.
StringpeekAuthToken(final Account account, final String authTokenType)
Gets an auth token from the AccountManager's cache.
AccountManagerFutureremoveAccount(final Account account, AccountManagerCallback callback, Handler handler)
Removes an account from the AccountManager.
AccountManagerFutureremoveAccount(final Account account, final Activity activity, AccountManagerCallback callback, Handler handler)
Removes an account from the AccountManager.
voidremoveOnAccountsUpdatedListener(OnAccountsUpdateListener listener)
Removes an OnAccountsUpdateListener previously registered with #addOnAccountsUpdatedListener .
voidsetAuthToken(Account account, final String authTokenType, final String authToken)
Adds an auth token to the AccountManager cache for an account.
voidsetPassword(final Account account, final String password)
Sets or forgets a saved password.
voidsetUserData(final Account account, final String key, final String value)
Sets one userdata key for an account.
AccountManagerFutureupdateCredentials(final Account account, final String authTokenType, final Bundle options, final Activity activity, final AccountManagerCallback callback, final Handler handler)
Asks the user to enter a new password for an account, updating the saved credentials for the account.