Code example for AccountManager

Methods: invalidateAuthToken

0
 
    /** 
     * Invalidate current auth token.  The next call to {@link #getRestClient(Activity, RestClientCallback) getRestClient} will do a refresh. 
     */ 
    public void invalidateToken(String lastNewAuthToken) {
        accountManager.invalidateAuthToken(getAccountType(), lastNewAuthToken);
    } 
 
    /** 
     * @return The first account found with the application account type. 
     */ 
    public Account getAccount() {
        Account[] accounts = accountManager.getAccountsByType(getAccountType());
        if (accounts == null || accounts.length == 0)
            return null; 
        return accounts[0];
    } 
 
    /** 
     * @param name The name associated with the account 
Contextual code suggestions in your IDE  Get Codota for Java