我有一个Code128C格式的条形码,它也使用GS1-128规范。
我在我的应用程序中使用ZXing Android Embedded库
当我尝试读取条形码时,我得到 30925018,但实际数据是 (30)925018 - 项目数:925018.
binding.zxingBarcodeScanner.decodeSingle(new BarcodeCallback() {
@Override
public void barcodeResult(BarcodeResult result) {
parseBarcodeResult(result);
}
@Override
public void possibleResultPoints(List<ResultPoint> resultPoints) {
}
});
DecodeHintType.ASSUME_GS1
我尝试将
IntentIntegrator
与自定义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);
使用此代码,我制作了
Code128Reader
以在 convertFNC1
方法中将 decodeRow
设置为 true,但我仍然从该数据中得到一个错误的条形码图像。