I have developed an application in android which contains videos. Now I want to take screen shots from that running video. Is anybody having any idea regarding this thing.
Pleas provide some example code or links.
I have developed an application in android which contains videos. Now I want to take screen shots from that running video. Is anybody having any idea regarding this thing.
Pleas provide some example code or links.
Try android-screenshot-library
these links may help you
it worked for me
What you need is using MediaPlayer. Put SurfaceView to your layout and provide it to the MediaPlayer. After the playback is begun you will be able to get snapshot from SurfaceView.
If you want to take the screenshot of your full screen (with status bar and all) you cannot do that programatically unless you have a rooted phone. If you want the screenshot of your app only, then you can. If you don't want it programatically, then you can-
Go to "Devices" view in eclipse and you have a screenshot (camera like) button there. You can find it from from Window -> Show View
.
Assume your video view is inside a linearlayout, you can try:
linearlayout.setDrawingCacheEnabled(true);
linearlayout.buildDrawingCache();
Bitmap bm = linearlayout.getDrawingCache();