Redth / ZXing.Net.Maui

Barcode Scanning for MAUI?
MIT License
460 stars 151 forks source link

Only QR-Codes recognized in .NET 8 #150

Closed kyndadumb closed 10 months ago

kyndadumb commented 10 months ago

With .NET 8.0 only QR codes are recognized, I have added the content of the README to a demo app (for Android, testet only in Android, via USB Debugging in Pixel 6) and the only form of barcodes that is recognized are barcodes. Including when "BarcodeFormats.OneDimensional" is set as the format flag.

kyndadumb commented 10 months ago

Update: I am trying to implement a scanner for EAN/GTIN. After further testing, I have detected that EANs are only identified after I have first scanned a QR code. Is this a known behavior, can I do something about it?

DiegoPatrocinio commented 10 months ago

Update: I am trying to implement a scanner for EAN/GTIN. After further testing, I have detected that EANs are only identified after I have first scanned a QR code. Is this a known behavior, can I do something about it?

I was experiencing the same issue, what did the trick for me was to set "Formats = BarcodeFormat.Ean13".

I only need EAN13 so it works well for me, but might not be a valid solution if you need to read several barcode types.

Full Config Options:

            cameraBarcodeReaderView.Options = new BarcodeReaderOptions
            {
                Formats = BarcodeFormat.Ean13,
                TryHarder = true,
                AutoRotate = true,
                Multiple = false
            };
kyndadumb commented 10 months ago

Thanks for your help, this does the trick :)