简体   繁体   English

QR Code扫描不适用于Barcode Scanner

[英]QR Code scan doesn't work with Barcode Scanner

I'm developing an android application for a tablet (model SynchroDigital INOSOP10-4.0 RES) and I'd like to use the ZXing library to scan a QRcode containing a string. 我正在为平板电脑(型号SynchroDigital INOSOP10-4.0 RES)开发一个android应用程序,我想使用ZXing库扫描包含字符串的QRcode。 It does launch the scanner when I need it but I can't scan anything. 当我需要它时,它会启动扫描仪,但是我什么也无法扫描。

Actually it doesn't even work if I use directly the Barcode Scanner application, the yellow dots appear but nothing happens, no matter the luminosity, the distance or the complexity of the QR Code (tried with a huge QR Code just containing the letter "A"), it just won't work. 实际上,如果我直接使用条形码扫描仪应用程序甚至都行不通,无论是亮度,距离还是QR码的复杂程度,黄点都会出现,但是什么也不会发生(尝试使用巨大的QR码,其中仅包含字母“ A”),就无法正常工作。

Yet it works perfectly with another code scanner, the one from the pic2shop app ! 但是,它可以与另一种代码扫描程序完美结合,这是来自pic2shop应用程序的代码!

The tablet's webcam is 1,3MP and doesn't have autofocus. 平板电脑的网络摄像头为1,3MP,没有自动对焦。

Does the issue come from the webcam ? 问题是否来自网络摄像头? Are there any others libraries I can easily implement instead of the ZXing one ? 是否有任何其他图书馆,我可以很容易地实现,而不是斑马线吗?

Thanks in advance. 提前致谢。

use below code, it will work for QR scanning, but it wouldn't work for barcode scan - 使用下面的代码,它将适用于QR扫描,但不适用于条形码扫描-

Intent objIntent = new Intent("com.google.zxing.client.android.SCAN"); 
objIntent.putExtra("SCAN_MODE", "QR_CODE_MODE"); 
startActivityForResult(objIntent, 0);

or use 或使用

Intent intent = new Intent(shopping.this, CaptureActivity.class);
startActivityForResult(intent, 0);

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM