How can I take a screen shot while recording a video?

A

AC Question

Screen Recording in Android by Programitacally

I am developing Android application. In my application, I have to capture a screen animation for few seconds as video in programmatically. Is it possible? When I Googled all the code are for starting camera in video mode or capture the system screen as video.
I need to record my application screen alone when I run in emulator or device and I have to store in video format in SDCard and later to play the video as needed.
Can anyone say is it possible in programmatically? if so please say how to do it. if not, give some suggestion for doing this task.