hi all,

I am new in android apps development but a - quite-  experienced java
developer.
first of all apologies if this is not the correct place to post...

I am facing some difficulties with the emulator and hope for some
help...

I want to record audio from the microphone. I have set the audio
recording hardware property and specified an sd card image file when
constructing my avd ( ver 2.2) but I get an annoying "setAudioSource
failed" exception- error when trying to set the AudioSource
value( either to .MIC or .DEFAULT )

I work with eclipse 3.5 (Galileo) on a win 7 computer and my
microphone has been tested and works fine
The application compiles, but when I run it on the emulator it
produces an exception...
The code is (commonly found in the web) the following and I get the
error in the second line

    MediaRecorder recorder = new MediaRecorder();
    recorder.setAudioSource(MediaRecorder.AudioSource.MIC);
    recorder.setAudioEncoder(MediaRecorder.AudioEncoder.AMR_NB);
    recorder.setOutputFile(path);
    recorder.prepare();
    recorder.start();

Any ideas?

thank you in advance

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

Reply via email to