ZXing Android Generate 1D barcode

Glorithm picture Glorithm · Jun 16, 2011 · Viewed 7.7k times · Source

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?

Answer

Sean Owen picture Sean Owen · Jun 16, 2011

You need the javadoc for Intents. You need ENCODE_FORMAT, not ENCODE_TYPE.