MediaStore.Video.Thumbnails.getThumbnail() returns null
<p>I have the following code;</p>

<pre><code>String[] projection = { MediaStore.Video.VideoColumns._ID, MediaStore.Video.VideoColumns.DATA };
                //String selection = MediaStore.Video.VideoColumns.KIND + "=" + MediaStore.Video.VideoColumns.;
                String sort = MediaStore.Video.VideoColumns._ID + " DESC";

                Cursor myCursor = getActivity().managedQuery(MediaStore.Video.Thumbnails.EXTERNAL_CONTENT_URI, projection, null, null, sort);


                try
                {
                    myCursor.moveToFirst();
                    Log.d("VIDEO_URI", intent.getDataString());
                    Bitmap bitmap = MediaStore.Video.Thumbnails.getThumbnail(
                            getActivity().getContentResolver(), myCursor.getLong(myCursor.getColumnIndexOrThrow(MediaStore.Video.VideoColumns._ID)),
                            MediaStore.Video.Thumbnails.MICRO_KIND,
                            (BitmapFactory.Options) null );

                    ImageView iv = (ImageView) getActivity().findViewById(R.id.attached_media_image);

                    //Log.d("IMAGE", curThumb.toString());

                    iv.setImageBitmap(bitmap);

                }
                catch (Exception e) {
                    // TODO: handle exception
                    Log.e("ERROR", e.toString());
                }
</code></pre>

<p>I get the following in my LogCat when this is ran;</p>

<pre><code>03-13 12:05:14.740: D/VIDEO_URI(7269): content://media/external/video/media/474
</code></pre>

<p>But it doesn't set the image of the iv to anything, and when I try to run the Log.d("IMAGE", curThumb.toString()); line, that is commented out in this example, it throws a null exception.</p>

<p>Any help would be much appreciated thank you.</p>
