1

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?

Vidhi Dave
  • 5,614
  • 2
  • 33
  • 55
gabrjan
  • 3,080
  • 9
  • 40
  • 69

1 Answers1

1

So I found the solution here: https://github.com/react-native-community/react-native-camera/issues/1115

There seems to be bug in 0.13 version of React Native Camera module.

gabrjan
  • 3,080
  • 9
  • 40
  • 69