Reputation: 729
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
When I'm trying to read the barcode, I get 30925018, but actual data is (30)925018 - Count of items: 925018.
binding.zxingBarcodeScanner.decodeSingle(new BarcodeCallback() {
@Override
public void barcodeResult(BarcodeResult result) {
parseBarcodeResult(result);
}
@Override
public void possibleResultPoints(List<ResultPoint> resultPoints) {
}
});
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.
Upvotes: 2
Views: 741