Unable to start recording
flagman5 opened this issue · 3 comments
flagman5 commented
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.
flagman5 commented
hmm ok..
- Turn on your computer, load a RN project using react-native init and the steps outlined here
- in the react-native directory, npm install react-native-sound-recorder --save
- react-native link
- in App.js, add import SoundRecorder from 'react-native-sound-recorder';
- then in a recording function add
SoundRecorder.start(SoundRecorder.PATH_CACHE + '/test.mp4')
.then(function() {
console.log('started recording');
alert("Started recording");
}); - build the app
- Invoke recording function
- get Fatal Exception: java.lang.IllegalStateException
kevinresol commented
You need to request permission from user first.
kevinresol commented
Closing due to inactivity