ZXing Android Generate 1D barcode

前端 未结 2 1164
青春惊慌失措
青春惊慌失措 2021-02-09 03:29

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/

相关标签:
2条回答
  • 2021-02-09 04:04

    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

    0 讨论(0)
  • 2021-02-09 04:12

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

    0 讨论(0)
提交回复
热议问题