i have this code for scanning barcode Through camera on android
btnBarcode = (TextView)findViewById(R.id.btnBAR);
btnBarcode.setOnClickListener(new View.OnClickListener()
{
public void onClick(View v)
{
Intent intent = new Intent("com.google.zxing.client.android.SCAN");
intent.setPackage("com.google.zxing.client.android");
intent.putExtra("com.google.zxing.client.android.SCAN.SCAN_MODE", "QR_CODE_MODE");
try
{
startActivityForResult(intent, 0);
}
catch (Exception e)
{
e.printStackTrace();
}
}
});
the scanner is open, but how to insert the reading to any String Variable?
您需要按照本文档中的说明重写onActivityResult()。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.