0

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"/>
Clemens
  • 99
  • 1
  • 10

2 Answers2

0

Please see code. I have shown code to start and stop record. Also Oleg Khalidov's link can help you. And android dev site solution.

Community
  • 1
  • 1
Dhrupal
  • 1,863
  • 1
  • 23
  • 38
0

I had to manually give the app permission to access the microphone and file system (Settings -> Apps -> 'Your App' -> Permissions)

Clemens
  • 99
  • 1
  • 10