I am trying to create a video thumbnail for a file : 1- the file is located on YouTube. 2- I would start an implicit intent for Andriod OS to play this file using:
Intent intent= new Intent(Intent.ACTION_VIEW, Uri.parse(youTubeVideoWebPath));
startActivity(intent);
where
String youTubeVideoWebPath = "http://www.youtube.com/watch?feature=player_detailpage&v=OZJalBmtGnQ";
after searching some posts on the forum, I found it could be either: 1- VideoView and set its background with the Thumbnail that I will extract from the video Or 2- ImageView which sets its source/background with the extracted Thumbnail
when an item (whether VideoView or ImageView) is clicked, I will send the previous mentioned intent. since I am not going to control playing the video by my application, I guess that it is better to use ImageView, right?
Secondly, I would like to create a video Thumbnail for that remote file so what is the best/easiest way to do that? For me, after doing more search on the forum, I found the following method:
Bitmap thumbAsBitmap = ThumbnailUtils.createVideoThumbnail(filePath, MediaStore.Video.Thumbnails.MINI_KIND);
But it always returns null, I dont know why although that I passed it: filePath: the web path of the file mentioned above second argument: not sure whether it should be MediaStore.Video.Thumbnails.MINI_KIND or MediaStore.Images.Thumbnails.MINI_KIND?
I can only find posts related to extracting VideoThumbnail from files saved in internal/external memory, nothing related to remote files such as my case.