I am trying to create a thumbnail with a video and put it in an ImageView on Android, but it does not work. I am not sure if the file path is being used correctly.
The code I'm using is:
ImageView iv = (ImageView) findViewById(R.id.imageView1);
String filepath = "android.resource://" + getPackageName() + "/" + R.raw.videotest;
Bitmap bm = ThumbnailUtils.createVideoThumbnail(filepath, Thumbnails.MINI_KIND);
iv.setImageBitmap(bm);
source
share