david
david

Reputation: 2142

Android - Audio recorder FileNotFound

I'm trying to record audio

this.recorder = new android.media.MediaRecorder();
this.recorder.setAudioSource(android.media.MediaRecorder.AudioSource.MIC);      this.recorder.setOutputFormat(android.media.MediaRecorder.OutputFormat.DEFAULT);
this.recorder.setAudioEncoder(android.media.MediaRecorder.AudioEncoder.DEFAULT);
this.recorder.setOutputFile("pruebaAudioRecorder.mp4");
**this.recorder.prepare();**
this.recorder.start();

but when i call prepare method throws the FileNotFound exception.

thx a lot.

Upvotes: 2

Views: 2263

Answers (1)

david
david

Reputation: 2142

here is a great solution, remember to add the WRITE_EXTERNAL_STORAGE permission

http://www.benmccann.com/blog/android-audio-recording-tutorial/

Upvotes: 3

Related Questions