I tried this example to record audio from the microphone.
When I start recording java.lang.RuntimeException: setAudioSource failed
always appears.
I also add this permissions to the AndroidManifest.xml
:
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>