Send feedback
Class GoogleAccountManager (2.0.1)
Stay organized with collections
Save and categorize content based on your preferences.
Version 2.0.1 keyboard_arrow_down
public final class GoogleAccountManager
Beta
Account manager wrapper for Google accounts.
Static Fields
ACCOUNT_TYPE
public static final String ACCOUNT_TYPE
Field Value
Constructors
GoogleAccountManager(AccountManager accountManager)
public GoogleAccountManager ( AccountManager accountManager )
Parameter
Name Description accountManager android.accounts.AccountManager
account manager
GoogleAccountManager(Context context)
public GoogleAccountManager ( Context context )
Parameter
Name Description context android.content.Context
context from which to retrieve the account manager
Methods
getAccountByName(String accountName)
public Account getAccountByName ( String accountName )
Returns the Google account of the given Account#name .
Parameter
Name Description accountName String
Google account name or null
for null
result
Returns
Type Description android.accounts.Account Google account or null
for none found or for null
input
getAccountManager()
public AccountManager getAccountManager ()
Returns the account manager.
Returns
Type Description android.accounts.AccountManager
getAccounts()
public Account [] getAccounts ()
Returns all Google accounts.
Returns
Type Description android.accounts.Account []array of Google accounts
invalidateAuthToken(String authToken)
public void invalidateAuthToken ( String authToken )
Invalidates the given Google auth token by removing it from the account manager's cache (if
necessary) for example if the auth token has expired or otherwise become invalid.
Parameter
Name Description authToken String
auth token
Send feedback
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License , and code samples are licensed under the Apache 2.0 License . For details, see the Google Developers Site Policies . Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-09-19 UTC.
[{
"type": "thumb-down",
"id": "hardToUnderstand",
"label":"Hard to understand"
},{
"type": "thumb-down",
"id": "incorrectInformationOrSampleCode",
"label":"Incorrect information or sample code"
},{
"type": "thumb-down",
"id": "missingTheInformationSamplesINeed",
"label":"Missing the information/samples I need"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"Other"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"Easy to understand"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"Solved my problem"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"Other"
}]
Need to tell us more?
{"lastModified": "Last updated 2024-09-19 UTC."}
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-09-19 UTC."]]