我使用的是二维码扫描库zxing。有没有办法同时使用多种条形码格式?
示例(ONE_D_CODE_TYPES和DATA_MIX
ScanOptions options = new ScanOptions();
//like this
options.setDesiredBarcodeFormats(ScanOptions.ONE_D_CODE_TYPES);
options.setDesiredBarcodeFormats(ScanOptions.DATA_MATRIX);
options.setPrompt("Scan a barcode");
options.setCameraId(0); // Use a specific camera of the device
options.setBeepEnabled(false);
options.setBarcodeImageEnabled(true);
您可以使用|
字符同时使用它们。尝试使用这两种方法:
options.setBarcodeFormats(ScanOptions.ONE_D_CODE_TYPES | ScanOptions.DATA_MATRIX);