title: Getting Fullscreen thumbnails from the mediastore - Android
body: <p>I keep getting an Error 'Unsupported kind: 2' when trying to get a FULL_SCREEN_KIND thumbnail from the mediastore. I know that the URI is a valid image (because I am already getting smaller thumbs beforehand). Where is my error? Thank you.</p>
  
  <p><strong>My Code</strong></p>
  
  <pre><code>Long myURI = Long.parseLong(record.getString("FILE_ID"));
  
  if (record.getString("FILE_TYPE").equalsIgnoreCase("image")) {
  
      Bitmap bitmap = MediaStore.Images.Thumbnails.getThumbnail(mContext.getContentResolver(), myURI ,MediaStore.Images.Thumbnails.FULL_SCREEN_KIND, (BitmapFactory.Options) null);
      return bitmap;
  
  } 
  
  else if (record.getString("FILE_TYPE").equalsIgnoreCase("video")) {
  
      Bitmap bitmap = MediaStore.Video.Thumbnails.getThumbnail(mContext.getContentResolver(), myURI, MediaStore.Video.Thumbnails.FULL_SCREEN_KIND, (BitmapFactory.Options) null);
      return bitmap;
  
  }
  </code></pre>
  
  <p><strong>LogCat</strong></p>
  
  <pre><code>06-22 15:24:05.160    3510-3935/com.diverg.tidy I/asd﹕ ID: 50735
  06-22 15:24:05.910    3510-3935/com.diverg.tidy W/dalvikvm﹕ threadid=21: thread exiting with uncaught exception (group=0x41ab3ba8)
  06-22 15:24:05.941    3510-3935/com.diverg.tidy E/AndroidRuntime﹕ FATAL EXCEPTION: Thread-8183
  Process: com.diverg.tidy, PID: 3510
  java.lang.IllegalArgumentException: Unsupported kind: 2
      at android.provider.MediaStore$InternalThumbnails.getThumbnail(MediaStore.java:670)
      at android.provider.MediaStore$Images$Thumbnails.getThumbnail(MediaStore.java:1022)
      at com.diverg.tidy.LightboxImageManager.getBitmap(LightboxImageManager.java:105)
      at com.diverg.tidy.LightboxImageManager.access$400(LightboxImageManager.java:32)
      at            com.diverg.tidy.LightboxImageManager$ImageQueueManager.run(LightboxImageManager.java:250)
      at java.lang.Thread.run(Thread.java:841)
  </code></pre>