rnc-archive / rncamera-example

This contains the RNCamera Example
https://github.com/react-native-community/react-native-camera
45 stars 45 forks source link

invalid prop googleVisionBarcodeType supplied #7

Closed m00kid closed 6 years ago

m00kid commented 6 years ago

I am trying to get the facedetector example to work on android. After cloning and running on my device I get stuck on this error. googlevisionbarcode

Any help appreciated, have been looking to solve this for several hours now to no avail...

package.json: "dependencies": { "react": "16.0.0", "react-native": "0.51.0", "react-native-camera": "git+https://git@github.com/react-native-community/react-native-camera" }

Covenanter commented 6 years ago

+1

marcusbelcher commented 6 years ago

Open Issue in the library itself (https://github.com/react-native-community/react-native-camera/issues/1461)

Add googleVisionBarcodeType={0} to renderCamera() in App.js It should now look like:

  `<RNCamera
    ref={ref => {
      this.camera = ref;
    }}
    style={{
      flex: 1,
    }}
    googleVisionBarcodeType={0}
    type={this.state.type}
    flashMode={this.state.flash}
    autoFocus={this.state.autoFocus}
    zoom={this.state.zoom}
    whiteBalance={this.state.whiteBalance}
    ratio={this.state.ratio}
    faceDetectionLandmarks={RNCamera.Constants.FaceDetection.Landmarks.all}
    onFacesDetected={this.onFacesDetected}
    onFaceDetectionError={this.onFaceDetectionError}
    focusDepth={this.state.depth}
    permissionDialogTitle={'Permission to use camera'}
    permissionDialogMessage={'We need your permission to use your camera phone'}
  >`
sibelius commented 6 years ago

Gonna track this in react-native-camera repo

jgfidelis commented 6 years ago

Should be fixed now