I am trying to build an application which allows me to record a video and saves it on the SD card.
So far it looks good but for the saving on the sd card part.
I get an error which I do not understand, or better said I do not understand how this error is produced.
I am new to android so my knowledge is limited. I hope it does not bother you to give me a hand.
Using java Syntax Highlighting
- holder = getHolder();
- holder.addCallback(this);
- holder.setType(SurfaceHolder.SURFACE_TYPE_PUSH_BUFFERS);
- recorder = new MediaRecorder();
- recorder.setAudioSource(MediaRecorder.AudioSource.MIC);
- recorder.setVideoSource(MediaRecorder.VideoSource.DEFAULT);
- recorder.setOutputFormat(MediaRecorder.OutputFormat.MPEG_4);
- recorder.setAudioEncoder(MediaRecorder.AudioEncoder.DEFAULT/*AMR_NB*/);
- recorder.setVideoEncoder(MediaRecorder.VideoEncoder.MPEG_4_SP);
Parsed in 0.032 seconds, using GeSHi 1.0.8.4
The medierecorder and following the part where I try to save it.
Using java Syntax Highlighting
- recorder.setOutputFile("/sdcard/test.3gp");
- recorder.setPreviewDisplay(holder.getSurface());
Parsed in 0.030 seconds, using GeSHi 1.0.8.4
LogCat gives me this when I try to start recording.
pid: 735
tag: IOException
message: java.io.filenotfoundexception: /sdcard/test.3gp
I hope anyone can help me with this.
If further informations are required I will be glad to provide them.
Regards Flare


