implementing a recorder in android
<p>I am developing an android application which involves playing, recording, and saving video to the SD card. I'm using the recorder class.</p>

<p>But the when I click the record button, the recording doesn't start.</p>

<p>Here is the code I tried:</p>

<pre><code>MediaRecorder recorder = new MediaRecorder();
 recorder.setAudioSource(MediaRecorder.AudioSource.MIC);
 recorder.setOutputFormat(MediaRecorder.OutputFormat.THREE_GPP);
 recorder.setAudioEncoder(MediaRecorder.AudioEncoder.AMR_NB);
 recorder.setOutputFile(PATH_NAME);
 recorder.prepare();
 recorder.start();   // Recording is now started
 ...
 recorder.stop();
 recorder.reset();   // You can reuse the object by going back to setAudioSource() step
 recorder.release(); // Now the object cannot be reused
</code></pre>
