kevinresol/react-native-sound-recorder

Unable to start recording

flagman5 opened this issue · 3 comments

I get a Fatal Exception: java.lang.IllegalStateException as soon as I invoke SoundRecorder.start, Crashlytics says it is due to com.kevinresol.react_native_sound_recorder.RNSoundRecorderModule.start (RNSoundRecorderModule.java:118)

Any ideas? Permission for RECORD_AUDIO is set correctly.

hmm ok..

  1. Turn on your computer, load a RN project using react-native init and the steps outlined here
  2. in the react-native directory, npm install react-native-sound-recorder --save
  3. react-native link
  4. in App.js, add import SoundRecorder from 'react-native-sound-recorder';
  5. then in a recording function add
    SoundRecorder.start(SoundRecorder.PATH_CACHE + '/test.mp4')
    .then(function() {
    console.log('started recording');
    alert("Started recording");
    });
  6. build the app
  7. Invoke recording function
  8. get Fatal Exception: java.lang.IllegalStateException

You need to request permission from user first.

Closing due to inactivity