title: onActivityResult not called after calling GoogleAccountCredential.newChooseAccountIntent()
body: <p>I've been following Google's tutorial for an App Engine connected Android project and I'm getting stuck on <a href="https://developers.google.com/eclipse/docs/endpoints-addauth" rel="nofollow">this page</a>.</p>
  
  <p>Specifically in section 8c there seems to be an error. As stated in the title, the onActivityResult method is not called in the following code.</p>
  
  <pre><code>    @Override
  protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_main);
  
      // Start up RegisterActivity right away
      Intent intent = new Intent(this, RegisterActivity.class);
      startActivity(intent);
  
      credential = GoogleAccountCredential.usingAudience(this,"server:client_id:" + WEB_CLIENT_ID);
      startActivityForResult(credential.newChooseAccountIntent(), REQUEST_ACCOUNT_PICKER);
      System.out.println("onCreate finished");
      //new EndpointsTask().execute(getApplicationContext());
  }
  
  @Override
  protected void onActivityResult(int requestCode, int resultCode, Intent data) {
  
      super.onActivityResult(requestCode, resultCode, data);
  
      switch (requestCode) {
      case REQUEST_ACCOUNT_PICKER:
          if (data != null &amp;&amp; data.getExtras() != null) {
  
              accountName = data.getExtras().getString(AccountManager.KEY_ACCOUNT_NAME);
              if (accountName != null) {
                  credential.setSelectedAccountName(accountName);
                  new EndpointsTask().execute(getApplicationContext());
              }
          }
          break;
      }
  </code></pre>
  
  <p>Everything has been going well up until this point when I noticed that the AsyncTask isn't being executed and nothing ends up in the Datastore in the GAE console.</p>
  
  <p>Is anyone aware of this problem and maybe point me in the right direction? I've been at this for hours and all I can think is there is a problem with the other activity not setting the "resultCode"</p>
  
  <p>Any help is greatly appreciated.</p>