Android: MediaRecorder start failed : -16 -
i've been trying implement video camera. never worked because of mysterious error (-16) on recorder.start(). here code: private void initrecorder(int width, int height) { recorder.setaudiosource(mediarecorder.audiosource.camcorder); recorder.setvideosource(mediarecorder.videosource.camera); parameters params = camera.getparameters(); list<size> sizes = params.getsupportedpreviewsizes(); size optimalsize = getoptimalpreviewsize(sizes, width, height); params.setpreviewsize(optimalsize.width, optimalsize.height); camcorderprofile cphigh = camcorderprofile .get(camcorderprofile.quality_low); recorder.setprofile(cphigh); file mediafile = null; if (environment.getexternalstoragestate().equals( environment.media_mounted)) { mediafile = new file( android.os.environment.getexternalstoragedirectory() + ...