我已经浏览了这里有关编码条形码的示例:
http://code.google.com/p/zxing/source/browse/trunk/androidtest/src/com/google/zxing/client/androidtest/ZXingTestActivity.java
但它生成的都是二维码。我正在寻找一维条形码生成/编码。什么是正确的编码类型?
Intent intent = new Intent("com.google.zxing.client.android.ENCODE");
intent.setPackage("com.google.zxing.client.android");
intent.putExtra("ENCODE_TYPE", "???");
条码扫描仪不喜欢 ENCODE_TYPE = CODE_39 或 CODE_93。有什么想法吗?
I've gone through the examples here regarding encoding barcode:
http://code.google.com/p/zxing/source/browse/trunk/androidtest/src/com/google/zxing/client/androidtest/ZXingTestActivity.java
But all it generates are QR. I'm looking for 1D barcode generation / encoding. What's the right encode type?
Intent intent = new Intent("com.google.zxing.client.android.ENCODE");
intent.setPackage("com.google.zxing.client.android");
intent.putExtra("ENCODE_TYPE", "???");
Barcode Scanner doesn't like ENCODE_TYPE = CODE_39 nor CODE_93. Any ideas?
发布评论
评论(2)
您需要 意图。您需要
ENCODE_FORMAT
,而不是ENCODE_TYPE
。You need the javadoc for Intents. You need
ENCODE_FORMAT
, notENCODE_TYPE
.编码/生成一维条形码
这里的关键是ENCODE_FORMAT &本例中的一维条形码格式 UPC_A &要编码的数据(对于 UPC 代码,它必须是 11/12 位)
希望这有帮助
To encode/generate 1D barcode
The key here is ENCODE_FORMAT & the 1D barcode format in this case UPC_A & the data (for UPC code it has to be 11/12 digits) to encode
Hope this helps