UPC-A and EAN-13


Currently I have both UPC-A and EAN-13 enabled, but when I scan a UPC-A barcode with a leading 0 (technically a EAN-13), it reads it as a UPC-A and strips the leading 0. 

If I add this code

config?.decoderParams?.upca?.preamble = ScannerConfig.Preamble.COUNTRY_AND_SYS_CHAR

It fixes the issue on that barcode, but then adds a leading 0 to all UPC-A barcodes.

Is there a way to handle both at the same time? Or will I have to have something in the app that allows you to toggle this on/off?

Here is an example barcode

Submitted by Florent CHARTIER on September 04, 2020 Permalink

Hello, I've exactly the same issue. Did you found a solution with the scanner configuration or did get it on your application side ?
Thans for your answer.