Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if (/* mediaFile.getPath() is of form content://, e.g: From Storage Access Framework on 4.4+ */) {
- long videoId = Long.parseLong(Uri.parse(mediaFile.getPath()).getLastPathSegment().split(":")[1]);
- ivThumbnail.setImageBitmap(MediaStore.Video.Thumbnails.getThumbnail(mContext.getContentResolver(), videoId, MediaStore.Images.Thumbnails.MINI_KIND, null));
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement