A barcode reading frame processor plugin for Vision Camera using ZXing.
It uses ZXing Android Embedded for Android and ZXingObjC for iOS.
npm install vision-camera-zxing
cd ios && pod install
Add the plugin to your babel.config.js
:
module.exports = {
plugins: [['react-native-worklets-core/plugin']],
// ...
Note: You have to restart metro-bundler for changes in the
babel.config.js
file to take effect.
-
Scan barcodes with vision camera.
import { zxing } from 'vision-camera-zxing'; // ... const frameProcessor = useFrameProcessor((frame) => { 'worklet'; const barcodes = zxing(frame,{multiple:true}); }, []);
-
Scan barcodes from a base64-encoded static image.
let results = await decodeBase64(base64,{multiple:true});
ZXing has a requirement of the direction of the barcode to scan and cannot return the exact barcode region.
You can use Dynamsoft Barcode Reader instead to meet your needs.
See the contributing guide to learn how to contribute to the repository and the development workflow.
MIT
Made with create-react-native-library