我想用react-native扫描GS1数据库条形码,我正在使用react-native-qrcode-scanner https://github.com/moaazsidat/react-native-qrcode-scanner来扫描条形码。
<QRCodeScanner
onRead={this.onSuccess}
showMarker={true}
reactivate={false}
flashMode={RNCamera.Constants.FlashMode.auto}
topContent={
<View>
<Text>
Scan Coupon Barcode
</Text>
<Text>Please fit the barcode within the {'\n'} box on the screen.</Text>
</View>
}
cameraStyle={styles.cameraContainer}
topViewStyle={styles.topcontainer}
bottomViewStyle={styles.zeroContainer}
markerStyle={styles.markerStyle}
containerStyle={styles.container}
/>它在android上运行良好,但在IOS上无法识别条形码。在IOS二维码中,正在成功扫描EAN-8条形码,但未扫描GS1数据库。
发布于 2021-04-05 22:57:31
没有找到使用React-Native在iOS上扫描GS1数据库扩展条形码的有效开源解决方案。
已尝试将Zxingify-ObjC作为本机模块,但在较新的iPhones (11专业版、12版)上扫描效果不佳。
已尝试react-native-barcode插件。不支持使用相机扫描仪的GS1数据库插件,但支持从静态图像扫描GS1数据库。
最终选择了付费软件开发工具包:Cognex。
希望这对遇到同样问题的人有所帮助。
发布于 2021-08-26 05:51:27
string.replace(/\D/g,"")将此方法应用于结果字符串。
https://stackoverflow.com/questions/66337881
复制相似问题