I READ HERE that using microphone might be possible in android emulator so I decided to try it out (Although an answer to THIS QUESTION says it's not possible)
I copy/pasted the code provided in the ANDROID DEVELOPERS WEBSITE and added
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.RECORD_AUDIO" />
to the manifest as well. The interface shows up, with two command buttons, one for start recording and one for play recording. The text on the start recording button changes to stop recording once I press it, but if I press on the stop recording button, the application sort of hangs and then crashes (Unfortunately, Mic Rec Test has stopped.
). The logcat then gives out this message
E/AudioFlinger( 40): Error reading audio input
E/AudioFlinger( 40): Error reading audio input
E/AudioFlinger( 40): Error reading audio input
E/AudioFlinger( 40): Error reading audio input
E/AudioFlinger( 40): Error reading audio input
E/AudioFlinger( 40): Error reading audio input
E/AudioFlinger( 40): Error reading audio input
E/AudioFlinger( 40): Error reading audio input
E/AudioFlinger( 40): Error reading audio input
E/AudioFlinger( 40): Error reading audio input
E/AudioFlinger( 40): Error reading audio input
over and over and over again. In fact, it's still doing it as I am writing this question. What does this mean, and why did the program crash when I clicked stop recording?
---EDIT---
I just checked the emulated virtual device detail properties by clicking on the Details...
button in the AVD Manager and in the AVD details box, I can see that hw.audioInput
is set to Yes
. This means recording audio from emulator should be possible shouldn't it?
--- EDIT 2 ---
Why is it impossible to use the Speech Recorder on the Android emulator?
I saw that the emulator comes with a built in speech recorder app, but the problem is still the same, the moment I click on record
, it crashes. That's fair enough, but Why have the speech recorder app in the emulator if the emulator is not supposed to work with sound input? Or am I missing something here, and it is in fact possible to get the sound recorder working?
It seems the audio features do not work if the emulator has been started using a snapshot. Even without the snapshot, the audio features still may or may not work depending on the computer. Please see HERE
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With