This repository was archived by the owner on Jun 16, 2023. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
This repository was archived by the owner on Jun 16, 2023. It is now read-only.
Front camera unable to barcode scan #2363
Copy link
Copy link
Closed
Labels
Needs more informationstaleThere has been a lack of activity on this issue and it may be closed soon.There has been a lack of activity on this issue and it may be closed soon.
Description
Bug Report
To Do First
- [x ] Did you try latest release?
- Did you try master?
- [ x] Did you look for existing matching issues?
Platforms
Versions
- Android: oreo
- iOS: ios 12
- react-native-camera: 2.10.2, 2.11.0
- react-native: 0.57.4
- react: 16.6.0-alpha.8af6728
Description/Current Behaviour
Trying to create an app that reads an employee badge barcode from a front camera.
If using google mlkit or regular barcode scan from the front camera, it does not read any barcode.
Expected Behaviour
Use front camera of phone or tablet to read a barcode
Steps to Reproduce
{ this.camera = ref; }} style={styles.preview} ref={cam => this.camera = cam} type={RNCamera.Constants.Type.front} defaultTouchToFocus onGoogleVisionBarcodesDetected={this.barcodeRecognized} googleVisionBarcodeType={RNCamera.Constants.GoogleVisionBarcodeDetection.BarcodeType.CODE_128} googleVisionBarcodeMode={RNCamera.Constants.GoogleVisionBarcodeDetection.BarcodeMode.ALTERNATE} >
<TouchableOpacity
style={{ backgroundColor: '#2E79F5', padding: 8, margin: 20, width: 300, height: 50}}
onPress={()=> this.props.navigation.navigate('Home')}
>
<Text style={{alignSelf: 'center', color: 'white', fontSize: 18}}>CANCEL</Text>
</TouchableOpacity>
</RNCamera>
</View>
Additionals
Love react-native-camera? Please consider supporting our collective: 👉 https://opencollective.com/react-native-camera/donate
Want this issue to be resolved faster? Please consider adding a bounty to it https://issuehunt.io/repos/33218414
Metadata
Metadata
Assignees
Labels
Needs more informationstaleThere has been a lack of activity on this issue and it may be closed soon.There has been a lack of activity on this issue and it may be closed soon.