in my app i need to display video thumb nail which is stored in res/raw folder. i searched regard it. i get the following code.
int id = **"The Video's ID"**
ImageView iv = (ImageView ) convertView.findViewById(R.id.imagePreview);
ContentResolver crThumb = getContentResolver();
BitmapFactory.Options options=new BitmapFactory.Options();
options.inSampleSize = 1;
Bitmap curThumb = MediaStore.Video.Thumbnails.getThumbnail(crThumb, id, MediaStore.Video.Thumbnails.MICRO_KIND, options);
iv.setImageBitmap(curThumb);
by this code i get video thumb nail from sdcard. but video from res/raw folder it does not show video thumb nail. i tried long time but i could not find solution. i tried in the following way.
I create an array and store the resource id (Ex: int[] videoid={R.raw.vi1,...}
) and place the id in MediaStore.Video.Thumbnails.getThumbnail(crThumb, videoid[position], MediaStore.Video.Thumbnails.MICRO_KIND, options);.
please help me. thanks in advance.