我在这里学习了教程,它的工作原理很有魅力。但我想启用PDF417
支持,但我不知道如何做到。
有人知道如何在zxing
中启用PDF417
吗?
我想通过添加PDF_417
,它可以在其中一行(IntentIntegrator.java)上,但似乎不起作用。
// supported barcode formats
public static final Collection<String> PRODUCT_CODE_TYPES = list("UPC_A", "UPC_E", "EAN_8", "EAN_13", "RSS_14");
public static final Collection<String> ONE_D_CODE_TYPES =list("UPC_A", "UPC_E", "EAN_8", "EAN_13", "CODE_39", "CODE_93", "CODE_128","ITF", "RSS_14", "RSS_EXPANDED");
添加到initiateScan参数。
报价:
使用ZXing(在Android上),如果你像这样启动PDF417条形码扫描。。。
List<String> oDesiredFormats = Arrays.asList("PDF_417".split(","));
IntentIntegrator integrator = new IntentIntegrator(this);
integrator.initiateScan(oDesiredFormats);
然后你启动一个"所有代码"(除了PDF417和其他一些)条形码扫描,就像这样。。。
IntentIntegrator integrator = new IntentIntegrator(this);
integrator.initiateScan();
来自对ZXing PDF417+ALL_CODE_TYPES 的评论
List<String> oDesiredFormats = Arrays.asList("UPC_A,UPC_E,EAN_13,EAN_8,RSS_14,RSS_EXPANDED,CODE_39,CODE_93,CODE_128,ITF,CODABAR,QR_CODE,DATA_MATRIX,PDF_417".split(","));
IntentIntegrator integrator = new IntentIntegrator(Globals.g_oActivity); integrator.initiateScan(oDesiredFormats);
信用:https://stackoverflow.com/users/3447790/mindmusic