Talha Malik
Talha Malik

Reputation: 1559

get videos from android gallery to android app activity screen

I am designing a small application for android. I have videos saved in my gallery. I want to retrieve and show a list/thumbnail of all videos saved in my gallery which on click start playing in the video player. I have no idea how to do it since i am new to android. Kindly explain your answer briefly.

Regards

Upvotes: 0

Views: 598

Answers (1)

Jaya Mayu
Jaya Mayu

Reputation: 17247

First you need to get list of videos from Gallery and show them in a ListView. You can have a ImageView for the video thumbnail and TextView for description or time etc.

You can create the Thumbnails as below in the GetView method.

ImageView imageThumbnail = (ImageView) row.findViewById(R.id.Thumbnail);
Bitmap bmThumbnail;
bmThumbnail = ThumbnailUtils.createVideoThumbnail(PATH_TO_VIDEO_IN_STRING, Thumbnails.MICRO_KIND);
imageThumbnail.setImageBitmap(bmThumbnail);

People here will expect you to do some coding before asking the question. I hope you can start up with this.

Upvotes: 1

Related Questions