title: onActivityResult() has Intent data as null after an Activity has finished
body: <p>Hi there I am calling an startActivityForResult() and trying to process the result in the onAcvityResult() method. However, the Intent data is null and result is RESULT_CANCELED. I am not sure why though.</p>
  
  <p>I am creating activity with:</p>
  
  <pre><code>startActivityForResult(new Intent(this, Class.class),LIST_RESULT);
  </code></pre>
  
  <p>then in the Activity class </p>
  
  <pre><code>@Override
  public void onBackPressed() {
      super.onBackPressed();
  
      Intent data = new Intent();
      Bundle bundle = new Bundle();
  
      bundle.putParcelable("name", la);
      data.putExtras(bundle);
  
      if (getParent() == null) {
          setResult(Activity.RESULT_OK, data);
      } else {
          getParent().setResult(Activity.RESULT_OK, data);
      }
  
      //finish();
  }
  </code></pre>
  
  <p>finish() has no effect. In fact I get warning in LogCat that duplicate finish request HistoryRecord</p>
  
  <p>And I am processing the result in:</p>
  
  <pre><code>@Override
  protected void onActivityResult(int requestCode, int resultCode, Intent data) {
      super.onActivityResult(requestCode, resultCode, data);
  
      switch(requestCode) {
      case(LIST_RESULT):
          if(resultCode == Activity.RESULT_OK) {
              previousList = data.getExtras();
          }
      break;
      }
  
  }
  </code></pre>
  
  <p>data is null and the resultCode is the Action.RESULT_CANCELED.</p>
  
  <p>Any ideas why I am not getting any through? Is something changing it in between me setting it and reading it? The mParent is also null in the activity that returns result.</p>
  
  <p>Alex</p>