title: How to extract file URI from camera intent?
body: <p>I was looking at some examples which fire an <code>android.media.action.IMAGE_CAPTURE</code> intent and use a class-level variable to store the resulting image. I don't want to do that. I think I should be able to give the intent the URI of the file and then get that URI back from the intent when it completes. I am trying to do this:</p>
  
  <pre><code>void snapPixButton_Click(object sender, EventArgs e)
  {
      Intent cameraIntent = new Intent(MediaStore.ActionImageCapture);
      File file = new File(Home.SnapStorageLocation, string.Format("{0}.jpg", Guid.NewGuid()));
  
      cameraIntent.PutExtra(MediaStore.ExtraOutput, file.ToURI().ToString());
  
      StartActivityForResult(cameraIntent, SnapPixIntentRequestCode);
  }
  
  protected override void OnActivityResult(int requestCode, Result resultCode, Intent data)
  {
      if (requestCode == SnapPixIntentRequestCode &amp;&amp; resultCode == Result.Ok)
      {
          URI uri = new URI(data.GetStringExtra(MediaStore.ExtraOutput));
          File file = new File(uri);
  
          using (Bitmap bitmap = LoadAndResizeBitmap(file.Path, this.ImageView.Width, this.ImageView.Height))
          {
              this.ImageView.SetImageBitmap(bitmap);
          }
      }
  }
  </code></pre>
  
  <p>But in <code>OnActivityResult</code>, the call to <code>data.GetStringExtra(MediaStore.ExtraOutput)</code> results in the message: Unknown identifier: MediaStore</p>
  
  <p>What am I doing wrong? I don't think I should have to keep class-level variables around, I should be able to pass data to an intent and then extract it afterwards, right?</p>