title: Return Image for android.media.action.image_capture Intent
body: <p>My app has the following intent-filter</p>
  
  <pre><code>    &lt;intent-filter&gt;
              &lt;action android:name="android.media.action.IMAGE_CAPTURE" /&gt;
  
          &lt;category android:name="android.intent.category.DEFAULT" /&gt;
          &lt;/intent-filter&gt;
  </code></pre>
  
  <p>I can choose my app from the list of apps which respond to the camera intent.</p>
  
  <p>Now, in my app I create a bitmap and store it in a temporary location on sdcard.</p>
  
  <p>I return this bitmap to the calling app by</p>
  
  <pre><code>    Intent shareIntent = new Intent(android.content.Intent.ACTION_SEND, Uri.parse("file:///sdcard/image.png")); 
          shareIntent.setType("image/png");
          this.setResult(Activity.RESULT_OK, shareIntent); 
          this.finish();
  </code></pre>
  
  <p>However, none of the apps can load this image. The messaging app gives the error "Sorry, you cannot add this picture to the message.". The contacts app gives the error "load failed!". I have checked the image gets saved at the proper location. I have also tried out </p>
  
  <pre><code>    shareIntent.putExtra("data",bitmap);
          shareIntent.putExtra(Intent.EXTRA_STREAM, Uri.parse("file:///sdcard/image.png"));
  </code></pre>
  
  <p>I have also tried saving the bitmap as a JPEG.</p>
  
  <p>However, none of these work. Are there any other methods of returning the image to the calling activity? How does the android camera return the image?</p>