Roman Svyatnenko
Roman Svyatnenko

Reputation: 729

ZXing Android Embedded GS-1 support

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?

Upvotes: 2

Views: 741

Answers (0)

Related Questions