Skip to content Skip to sidebar Skip to footer

Trouble Capturing Activity Result When Firing Intent Received From Accountmanagerfuture

I am trying to follow Authenticating to OAuth2 Services and implement the part where an Intent is included in the Bundle provided by the AccountManagerFuture#getResult() call. The

Solution 1:

OK, so I think I figured this one out - I'll post the answer, just in case:

The issue is that the system provides the Intent with the NEW_TASK flag set. I needed to clear it to make this work for me:

finalIntentcredentialsIntent= (Intent) intent.getParcelableExtra(Intent.EXTRA_INTENT);
if (credentialsIntent != null) {
  credentialsIntent.setFlags(0);
  startActivityForResult(credentialsIntent, REQUEST_CODE_LAUNCH_CREDENTIALS_INTENT);
}

Post a Comment for "Trouble Capturing Activity Result When Firing Intent Received From Accountmanagerfuture"