Code example for AccountManagerFuture

Methods: getResult

0
 
    private String buildToken(AccountManager manager, Account account, Activity activity)
            throws OperationCanceledException, AuthenticatorException, IOException { 
        AccountManagerFuture<Bundle> future = manager.getAuthToken(account, "ah", null, activity,
                null, null); // ah is app engine 
        Bundle token = future.getResult();
        return token.get(AccountManager.KEY_AUTHTOKEN).toString();
    } 
 
}