The system does not automatically show activity when present KEY_INTENT. It is for you to start this activity.
Here is a sample code:
private AccountManagerCallback<Bundle> mAccountManagerCallback = new AccountManagerCallback<Bundle>() {
public void run(AccountManagerFuture<Bundle> future) {
Bundle bundle;
try {
bundle = future.getResult();
if (bundle.containsKey(AccountManager.KEY_INTENT)) {
Intent intent = bundle.getParcelable(AccountManager.KEY_INTENT);
int flags = intent.getFlags();
flags &= ~Intent.FLAG_ACTIVITY_NEW_TASK;
intent.setFlags(flags);
startActivityForResult(intent, REQUEST_CODE_AUTH);
} else {
if (bundle.containsKey(AccountManager.KEY_AUTHTOKEN)) {
String authToken = bundle.getString(AccountManager.KEY_AUTHTOKEN);
String userMail = bundle.getString(AccountManager.KEY_ACCOUNT_NAME);
}
}
}
catch(...) {
...
}
}
}
I hope this is what you were looking for, but if I did not understand your question correctly, please clarify.
Hooray!
source
share