android mediaRecorder.setAudioSource failed

android mediaRecorder.setAudioSource failed

Add this two permission on manifest 

<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />

And make sure that permissions are granted.

For marshmallow and later it’s need to implement runtime permission . Here you can get how to use runtime
permission

ANDROID RUNTIME PERMISSION

Leave a Reply

Your email address will not be published. Required fields are marked *