if you are trying to capture the current application activity you can use this code in a thread with a timer.
RelativeLayout rl1 = (RelativeLayout)findViewById(R.id.relative_layout_1);
View v1 = rl1.getRootView();
v1.setDrawingCacheEnabled(true);
bitmap = Bitmap.createBitmap(v1.getDrawingCache());
v1.setDrawingCacheEnabled(false);
and you can make a video. refer This Link