How to use Mediaprojection library in android to capture screen and convert into mp4 file?
问题 Since android 5.0 they are providing mediaprojection library to capture screen content. but sample demo application provided by them is not clear. U can find sample app here. In that application they are projecting captured screen using virtualdisplay method private void setUpVirtualDisplay() { Log.i(TAG, "Setting up a VirtualDisplay: " + mSurfaceView.getWidth() + "x" + mSurfaceView.getHeight() + " (" + mScreenDensity + ")"); mVirtualDisplay = mMediaProjection.createVirtualDisplay(