This is my code. I am beginner in Android .Can anyone tell me ? What 
mistake i have done here 

String OUTPUT_FILE=Environment.getExternalStorageDirectory()+"/music_1.amr";


private void beginRecording() throws Exception  {
       bMediaRecorder();
       //try{
       File outFile=new File(OUTPUT_FILE);
       // }
       if(outFile.exists())
        outFile.delete();
        
        recorder=new MediaRecorder();
        recorder.setAudioSource(MediaRecorder.AudioSource.CAMCORDER);
        recorder.setOutputFormat(MediaRecorder.OutputFormat.RAW_AMR);
        recorder.setAudioEncoder(MediaRecorder.AudioEncoder.DEFAULT);
        recorder.setOutputFile(OUTPUT_FILE);
        recorder.prepare();
        recorder.start();
 }

private void bMediaRecorder() {
// TODO Auto-generated method stub
 if(recorder!=null)
recorder=null;
        recorder.release();
        

On Tuesday, July 31, 2012 12:09:37 PM UTC+5:30, asheesh arya wrote:
>
> create a file with the same name in your source code!!
>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to