Is there any way to turn autofocus on BarCodeScanner
because our barcodes are pretty complex and the camera has to focus in order to get them
or if there is a different approach id be happy to hear that.
Thanks! -Jovan
Hi,
BarCodeScanner is implemented as Camera with props passed on, so you can just forward the autoFocus prop.
@edgar i tried forward the autoFocus prop it doesnt work am i doing something wrong?
<BarCodeScanner
onBarCodeRead={this._handleBarCodeRead}
style={StyleSheet.absoluteFill}
barCodeTypes={[BarCodeScanner.Constants.BarCodeType.code128]}
autoFocus={Camera.Constants.AutoFocus.on}
focusDepth={1}
defaultOnFocusComponent
onFocusChanged={() => {
console.log('focusChanged');
}}
zoom={1}
onZoomChanged={() => {}}
/>