title: Passing data in startActivityForResult and getting it back in onActivityResult
body: <p>I have a ListView with a context menu where the user can take a picture. I take the picture like this: </p>
  
  <pre><code>Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
  this.startActivityForResult(intent, PICTURE_RESULT);
  </code></pre>
  
  <p>and retrieving it like this:</p>
  
  <pre><code>public void onActivityResult(int requestCode, int resultCode, Intent data) {
      if (requestCode == PICTURE_RESULT) {
          long itemId = ???
          savePicture(itemId, data.getExtras());
      }
  }
  </code></pre>
  
  <p>How do I pass along the ListView item id? I tried intent.putExtras and intent.getLongExtra, but the data is not passed with the result intent. I can't use an instance variable because the activity can get destroyed if the user swaps to landscape when taking the picture.</p>