I am capturing video using MediaRecorder. The part of the code is given below.
surfaceView = (SurfaceView) findViewById(R.id.surface_camera); mCamera = Camera.open(); surfaceHolder = surfaceView.getHolder(); surfaceHolder.addCallback(this); surfaceHolder.setType(SurfaceHolder.SURFACE_TYPE_PUSH_BUFFERS); But surfaceHolder.setType(SurfaceHolder.SURFACE_TYPE_PUSH_BUFFERS); is deprecated. Is there any other methods instead of this method. I want to run my code in all versions.