title: "no entry for content://media/external/images/media/0" when using MediaStore.Images and contentResolver to get images stored on device
body: <p>I have a very basic requirement. I need the last captured image (and its thumbnail) from the device camera which I can use.</p>
  <p><strong>I use the following code to get the image thumbnail:</strong></p>
  <pre><code>String[] projection={MediaStore.Images.Thumbnails._ID,MediaStore.Images.Thumbnails.IMAGE_ID,
  MediaStore.Images.Thumbnails.KIND,MediaStore.Images.Thumbnails.DATA};
  
  Cursor cursor=MediaStore.Images.Thumbnails.queryMiniThumbnails(getContentResolver(),MediaStore.Images.Thumbnails.EXTERNAL_CONTENT_URI, MediaStore.Images.Thumbnails.MINI_KIND, projection);
  </code></pre>
  <p><strong>And the following for the actual images:</strong></p>
  <pre><code>String[] largeimage_projection={MediaStore.Images.ImageColumns._ID,MediaStore.Images.ImageColumns.DATA,};
  
  String largeFileSort=MediaStore.Images.ImageColumns._ID+&quot; DESC&quot;;
  
  Cursor cursor=getContentResolver().query(MediaStore.Images.Media.EXTERNAL_CONTENT_URI, largeimage_projection, null, null, sort);
  </code></pre>
  <p>However, on running the app on my Samsung Galaxy Tab 8.9, I get the following error:</p>
  <p><strong>For Thumbnails:</strong></p>
  <p>No Entry for content://media/external/images/Thumnails/0</p>
  <p><strong>For images:</strong></p>
  <p>No Entry for content://media/external/images/media/0</p>
  <p>Upon checking on the device, I found that the default location for images is &quot;/mnt/sdcard/DCIM/Camera/&quot;</p>
  <p>Also i cannot use the &quot;intent.getExtras()&quot; returned in the onActivityResult() method because i always get this as null for my tab.</p>
  <p>Can anyone tell me where I am going wrong? Thanks.</p>