juliansteenbakker / mobile_scanner

A universal scanner for Flutter based on MLKit. Uses CameraX on Android and AVFoundation on iOS.
BSD 3-Clause "New" or "Revised" License
807 stars 471 forks source link

Multiple values for code39 barcode #974

Open PhenixZeller opened 5 months ago

PhenixZeller commented 5 months ago

I get multiple values when I scan a code39 type of barcode.

Flutter version: 3.19.0 Package version: 3.5.7

Example: Screenshot 2024-03-05 at 07 55 04

Output onDetect:

onDetect: (capture) {
  for (final bc in capture.barcodes) {
    print('${bc.rawValue} || ${bc.displayValue} (format = ${bc.format}, type = ${bc.type})');
  }

// Returns
/*
20472E8
20472O
20472148
20472142 // Should be the only result
20472842
2047HE8
20472E
204724 
*/

Where do the values come from?

navaronbracke commented 5 months ago

Well, that depends on how MLKit detects the barcode. There isn't much we can do here.

aungmyopaing890 commented 3 months ago

Hay @PhenixZeller, Did you solved Multiple values problems, i am also facing this error

PhenixZeller commented 3 months ago

Hay @PhenixZeller, Did you solved Multiple values problems, i am also facing this error

No. I switched to another package which uses ZXing (Zebra Crossing) barcode scanning library instead of MLKit.