react-native-sound-recorder: setAudioSource Failed on SoundRecorder.stop()

Thank you for this amazing library @kevinresol , but i am facing some problems: The app crashes when on SoundRecorder.stop() works fine on iOS but crashes on Android, i have included the android permission in the AndroidManifest as you mentioned : <uses-permission android:name="android.permission.RECORD_AUDIO" />

And here is the code for SoundRecorder.stop():

SoundRecorder.stop().then(function(result) {
      console.log("stopped recording, audio file saved at: ", result.path);
      this.onSendFile(result.path, "test.mp4", "audio/mpeg");
    });

The Error i get is described in the below image:

screen shot 2018-07-19 at 11 25 33 am

Thank you in advance

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 15 (10 by maintainers)

Most upvoted comments

Hey, Thanks for the support. I found a fix for this issue. basically its something related to the android only and the “MediaRecorder” class. PR #11