2

INTRODUCTION

I have a barcode in the Code128C format, which also uses the GS1-128 specification.

I use the ZXing Android Embedded library in my app

Original Barcode image

PROBLEM

When I'm trying to read the barcode, I get 30925018, but actual data is (30)925018 - Count of items: 925018.

CODE

binding.zxingBarcodeScanner.decodeSingle(new BarcodeCallback() {
        @Override
        public void barcodeResult(BarcodeResult result) {
            parseBarcodeResult(result);
        }

        @Override
        public void possibleResultPoints(List<ResultPoint> resultPoints) {

        }
    });

ATTEMPTS

  1. DecodeHintType.ASSUME_GS1

I tried to use IntentIntegrator with custom Intent

IntentIntegrator integrator = new 
IntentIntegrator(integrator.setDesiredBarcodeFormats(IntentIntegrator.ALL_CODE_TYPES);
integrator.setPrompt("Scan a barcode");
integrator.setCameraId(0);
integrator.setBeepEnabled(false);
integrator.setBarcodeImageEnabled(true);
Intent intent = integrator.createIntent();
intent.putExtra("ASSUME_GS1", true);
startActivityForResult(intent, REQUEST_CODE);

Using this code I made Code128Reader to set convertFNC1 as true in the decodeRow method, but I still have a bad barcode image from this data.

  1. My question about barcodes with images

QUESTIONS

  1. Is the GS1-128 specification supported in the ZXing library?
  2. If not, how can I process GS1-128 in the application?
Terry Burton
  • 2,801
  • 1
  • 29
  • 41
Roman Svyatnenko
  • 699
  • 12
  • 27
  • 1
    According to its github page, ZXing supports Code 128, of which GS1-128 is a subset. Those parentheses are not encoded into a GS1-128 barcode though, they're added when presenting the barcode in human-readable form. It seems to me like you were able to scan all the information, but you're looking for a way to extract the various parts in order to be able to present the barcode in a more human-readable form. For that you may need some sort of parser. – Michael Nov 02 '18 at 12:08
  • This seems relevant: https://github.com/zxing/zxing/issues/227 – Michael Nov 02 '18 at 12:08

0 Answers0