ZXing Android Generate 1D barcode

一笑奈何 提交于 2019-12-03 07:03:05

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

To encode/generate 1D barcode

Intent intent = new Intent("com.google.zxing.client.android.ENCODE");

intent.putExtra("ENCODE_FORMAT", "UPC_A");
intent.putExtra("ENCODE_DATA", "12345678901");

startActivity(intent);

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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!