I would like to create a video recorder and so far haven\'t figured out how to set parameters in order to successfully go through MediaRecorder.prepare() method.
Exe
In my case, copying and pasting the samples above didn't work. Then, viewing the methods in MediaRecorder, I found setPreviewDisplay. I called this method passing the surface used in Camera.setPreviewDisplay, the IOException in .prepare is gone and I was able to record video. Try yourself and post your results.