I'm trying to take multiple images with ReactNativeCamera module. I have 2 functions first for taking the image:
takePicture() {
const options = {};
this.setState({searching:false});
this.camera.capture({metadata: options})
.then((data) => {
console.log(data);
this.setState({filePath:data.path})
})
.catch(err => console.error(err));
}
When this happens the screen freezes with the image that I took. I'm unable to take another image now. I've tried like that:
retakeImage(){
this.setState({searching:true});
this.camera.startPreview();
}
Any ideas what am I doing wrong, or how to restart the image preview?