So I\'m trying to do a screen shot of a VideoView. I figured the easiest way would be:
videoView.setDrawingCacheEnabled(true);
Then when I
Since API 10, you can use MediaMetadataRetriever to retrieve a frame at given time (in micro seconds). Here is a sample code:
public Bitmap videoFrame(String uri, long msec) {
MediaMetadataRetriever retriever = new MediaMetadataRetriever();
try {
retriever.setDataSource(uri);
return retriever.getFrameAtTime(msec);
} catch (IllegalArgumentException ex) {
ex.printStackTrace();
} catch (RuntimeException ex) {
ex.printStackTrace();
} finally {
try {
retriever.release();
} catch (RuntimeException ex) {
}
}
return null;
}