title: onActivityResult returns null data for an Image Capture
body: <pre><code>@Override
  protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
  
      filePath = getOutputMediaFile(FileColumns.MEDIA_TYPE_IMAGE);
      File file = new File(filePath);
      Uri output = Uri.fromFile(file);
      Intent i = new Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE);
      i.putExtra(MediaStore.EXTRA_OUTPUT, output);
      startActivityForResult(i, RETURN_FILE_PATH);
  }
  
      @Override
  protected void onActivityResult(int requestCode, int resultCode, Intent data) {
      super.onActivityResult(requestCode, resultCode, data);
  
      //data is always null here.
      //requestCode = RETURN_FILE_PATH;
      //resultCode = Activity.RESULT_OK;
  }
  </code></pre>
  
  <p>I checked the values for <strong>file</strong> and <strong>output Uri</strong>, both are fine and the captured <strong>image actually exists at that location</strong>.</p>
  
  <p>But the data returned in <code>onActivityResult</code> is always <code>null</code> even after capturing the image.</p>
  
  <p><strong>EDIT:</strong></p>
  
  <p>I checked this question:</p>
  
  <p><a href="https://stackoverflow.com/questions/9231875/onactivityresult-returns-with-data-null?rq=1">onActivityResult returns with data = null</a></p>
  
  <p>which says:</p>
  
  <blockquote>
    <p>Whenever you save an image by passing EXTRAOUTPUT with camera intent
    the data parameter inside the onActivityResult always return null. So,
    instead of using data to retrieve the image , use the filepath to
    retrieve the Bitmap.</p>
  </blockquote>
  
  <p>and maybe that solution will work for me. But the above code of mine was a working code until now for the same scenario.</p>