Android EMDK Stripping Leading 0 on EAN13 Barcodes

// Expert user has replied.
L Lindsey Sleeth 2 years 10 months ago
124 1 0

My team is working with UPC-A and EAN-13 barcodes and would like to retain the leading 0 as part of the EAN-13 barcodes. We are using the EMDK for Android and currently are enabling the decoderParams for both UPC-A and EAN-13 as shown below.

decoderParams.upca.enabled = true
decoderParams.ean13.enabled = true

With this configuration, scanning an EAN-13 barcode with a leading zero (ex: 0745114240422) will return the barcode without the zero (745114240422). We have searched for a way to stop this from happening but cannot find a solution. One possible solution we found was to enable the COUNTRY and SYS_CHAR as part of the Preamble for the UPC-A barcodes, so our configuration then looks like this:

decoderParams.upca.preamble = ScannerConfig.Preamble.COUNTRY_AND_SYS_CHAR
decoderParams.upca.enabled = true
decoderParams.ean13.enabled = true

This configuration does prevent the leading zero from being stripped off of the EAN-13 barcodes, however, it adds a leading zero to the UPC-A barcodes (Ex: 745114240422 becomes 0745114240422), which is not something that we would like.

Is this our only option for resolution or is there an additional parameter or solution that we are overlooking?

Thank you!

Please Register or Login to post a reply

1 Replies

J James Swinton-Bland

Hi Lindsey,

Unfortunately I believe this is indeed your only option. You could potentially add an ADF rule to datawedge which says "If barcode symbology is UPC-A, strip the leading zero" which would achieve your desired outcome. Alternatively you could handle this with logic in your app, too.

Please see here for ADF documentation: https://techdocs.zebra.com/datawedge/6-3/guide/process/adf/

CONTACT
Can’t find what you’re looking for?