我尝试编写以app128格式扫描代码的Android应用程序。
我使用支持它的Zxing库。
另一次扫描工作正常。
我使用此代码启动扫描程序:
Intent intent = new Intent("com.google.zxing.client.android.SCAN");
//intent.putExtra("SCAN_MODE", "PRODUCT_MODE");
intent.putExtra("SCAN_FORMATS", "CODE_128");
startActivityForResult(intent, SCAN_TYPE_POSITION);
我做错了什么?
感谢您的回答
答案 0 :(得分:0)
public void scanBar(View v) {
try {
//start the scanning activity from the com.google.zxing.client.android.SCAN intent
Intent intent = new Intent(ACTION_SCAN);
intent.putExtra("SCAN_FORMATS", "CODE_128");
startActivityForResult(intent, 0);
} catch (ActivityNotFoundException anfe) {
//on catch, show the download dialog
showDialog(Barcode2Activity.this, "Ñão foi encontrado scanner de código de barras", "Deseja realizar o Download?", "Sim", "Não").show();
}
}