My code works as soon as the user authenticates my application to view and manage mail.

Or it looks something like this:

However, for the first time (for the first request), the Google dialog box appears at the top (above) and asks the user for authentication, then the AccountManagerCallback is never called, even if the user selects "OK" (even "Cancel" should return some value)
Here is my code:
AccountManagerFuture<Bundle> future = mAccountManager.getAuthToken(mAccount, "oauth2:https://mail.google.com/", null, mActivity, new OnTokenAcquired(), null);
And the code of AccountManagerCallback:
private class OnTokenAcquired implements AccountManagerCallback<Bundle> {
@Override
public void run(AccountManagerFuture<Bundle> result) {
}
}
}
Again, my code works (AccountManagerCallback calls) as soon as the user selects "OK" in the above dialog box. Then call the getAuthToken () method again.
Kitkat (Samsung Tab Pro 8.4), Bean (Galaxy Nexus). , Kitkat vs. Jelly Bean Samsung Nexus.
, ?