Wildly inconsistent Barcode scanning

I’m scanning vehicle VIN tags and sometimes it scans right away other times not at all. When it does scan it usually it takes about 10 to 20 seconds to recognize a VIN. I’ve tried both the BarCodeScanner and Camera components.

I’m on Expo 32 with the following settings:

<Camera
style={styles.camera}
type={‘back’}
useCamera2Api={true}
whiteBalance={this.state.whiteBalance}
flashMode={this.state.torch}
barCodeScannerSettings={{
barCodeTypes: [
BarCodeScanner.Constants.BarCodeType.qr,
BarCodeScanner.Constants.BarCodeType.code39
]
}}
onBarCodeScanned={this.onBarCodeScanned}
videoStabilizationMode={Camera.Constants.VideoStabilization.off}
/>

Any suggestions are greatly appreciated, I’m getting desperate. The app we’re building is focused entirely on this feature but it’s unusable. Getting worried that I’ll have to eject and rebuild the whole thing.

Scanned every vehicle on our lot and got all them to scan on both iOS and Android but only after fiddling with orientation. Some work upright, some in landscape but I had the best luck upside down. Some VIN tags are horizontal while others are vertical. On average it takes a minute to find the right orientation and scan the VIN.

What does orientation have to do with VIN scanning? Do I need to potentially lock down a setting?

Thanks

So, locking the orientation seems to have a positive benefit. still not perfect but improved. Also rhythmically moving the camera closer and farther seems to help.

Hi @edealer!

Could you link a Snack so I can run it on my end and see if I can repro the same issue?

Thanks!

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.