mgcrea / vision-camera-barcode-scanner

High performance barcode scanner for React Native using VisionCamera
MIT License
87 stars 11 forks source link

Unable to scan Data Matrix barcodes on Android #13

Closed seanpcoyle closed 11 months ago

seanpcoyle commented 11 months ago

When scanning a Data Matrix barcode on Android, the barcode is not recognized. Everything works as expected on iOS.

Relevant JavaScript:

const { props: cameraProps, highlights } = useBarcodeScanner({
  barcodeTypes: [
    'ean-8',
    'ean-13',
    'code-39',
    'code-93',
    'code-128',
    'data-matrix',
    'qr'
  ],
  onBarcodeScanned: onCodeScanned
});

Errors from adb logcat:

For each captured frame, the following message is shown:

2023-11-16 15:57:41.274  7031-7210  VideoPipeline           [app name]                 I  ImageReader::onImageAvailable!
2023-11-16 15:57:41.276  7031-7210  VisionCameraCodeScanner [app name]                 E  Unsupported barcode type: data-matrix

Package Versions

Package Version
@mgcrea/vision-camera-barcode-scanner 0.6.3
react-native-vision-camera 3.6.6

Device Info

Samsung Galaxy A14 (SM-A145M/DS)