title: From Bitmap to Uri - Android
body: <p>In my Project I'm saving a given <code>Bitmap</code> to my phone's local gallery with the following method:</p>
  
  <pre><code>Bitmap bmp = some_fancy_bitmap;
  imgeUrl = MediaStore.Images.Media.insertImage(getContentResolver(), bmp, "some Title", "some_Description");
  </code></pre>
  
  <p><a href="http://developer.android.com/reference/android/provider/MediaStore.Images.Media.html#insertImage%28android.content.ContentResolver,%20android.graphics.Bitmap,%20java.lang.String,%20java.lang.String%29" rel="nofollow"><code>MediaStore.Images.Media.insertImage</code></a> gets the source <code>Bitmap</code>, saves it, and returns a <code>String</code> with the <code>URL</code> to the newly created image, or <code>null</code> if the image failed to be stored for any reason.</p>
  
  <p>This is an example of imageUrl I am returned in case of successful saving: <code>content://media/external/images/media/223</code>.</p>
  
  <p>I'd now like to pass this <code>Bitmap</code> to a new <code>Activity</code>, in the form of the <code>Uri</code> of the resource.</p>
  
  <p>How can I transform the imageUrl I was returned, or directly the <code>Bitmap</code> bmp, into the resource's <code>Uri</code>?</p>
  
  <p><strong>Note:</strong> imageUrl is a <code>String</code>, and I want to get an <code>Uri</code>, not an <code>URI</code>.</p>