Follow

EAN-13 vs. UPC-A and the number of digits

EAN-13 and UPC-A are using the same encoding scheme and both contain 13 digits. 

However, the UPC-A barcodes do not show the leading zero of the barcode which is a country code indicator for North America. 

EAN1_vs_UPC-A.png

Scandit SDK 6.15.x has introduced an Ean13UpcaClassification class to programatically differentiate between EAN-13 & UPC-A barcodes.

Please see the below example for how this class should be implemented in Android Native, using the onBarcodeScanned(...) callback:

 

@Override 
public void onBarcodeScanned(
@NonNull BarcodeCapture barcodeCapture,
@NonNull BarcodeCaptureSession session,
@NonNull FrameData frameData
) {
...
Barcode barcode = session.getNewlyRecognizedBarocdes().get(0);
// Using the Ean13UpcaClassification class
Boolean isUpca = Ean13UpcaClassification.isUpca(barcode);
Boolean isEan13 = Ean13UpcaClassification.isEan13(barcode);
...
}

 

Please refer to your framework’s documentation to learn more about this addition:

Android Native: https://docs.scandit.com/data-capture-sdk/android/barcode-capture/api/ean13-upca-classification.html
iOS Native: https://docs.scandit.com/data-capture-sdk/ios/barcode-capture/api/ean13-upca-classification.html

If you are using any other framework, please see the relevant documentation on our developers page to see how you can implement Scandit's EAN-13/UPC-A classification on your platform.

 

Classification on Scandit SDK Version 6.14 & Below

If you are currently using Scandit SDK version <= 6.14.x, please reach out to us at support@scandit.com for instructions on how to programatically differentiate between EAN-13 and UPC-A barcodes.

In case you want to read more about the EAN-13/UPC-A symbologies, please see the following document:
https://www.gs1.org/docs/barcodes/GS1_Barcodes_Fact_Sheet-GS_EAN_UPC_family.pdf

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request