1

react-native-camera: 3.7.2 node: 10.23.1

Problem: I have a button to read the QR Code. Right after reading the QR Code, automatically opens the camera to take a photo. When the camera opens, it goes black There is no error on the console. Open the camera, but everything is black. The problem only happens the first time you open the camera. It is not a permission problem, as soon as you open the application you are already asked to accept the permission to use the camera.

I have a class component called QR Camera, where inside it I use the renderCamera () that I call RNCamera.

 <RNCamera
        autoFocus="on"
        whiteBalance="auto"
        captureAudio={false}
        useCamera2Api={false}
        style={styles.preview}
        type={RNCamera.Constants.Type.front}
      >

The problem only happens on the first attempt to use the camera to take a picture.

Hora
  • 162
  • 1
  • 8

0 Answers0