Android 中的条码扫描仪无法扫描
我想制作一个应用程序,其中用户扫描产品中的条形码,然后 Android 手机将显示有关该产品的一些详细信息(来自数据库)。 我已经在我的 Android 手机上安装了 ZXing 条码扫描仪,我用它来调试我的应用程序。当我使用 ZXing 应用程序时,它会扫描条形码。 但是,当我使用我在另一篇文章中找到的以下代码从我的 Android 项目中打开 ZXing 时,它不会扫描条形码。我可以在手机摄像头中看到红线,但不会显示绿点“读取”条形码。
为什么会发生这种情况? 提前致谢
I want to make an application in which the user scans a barcode from a product and then the android phone will show some details about the product (from a database).
I have installed ZXing barcode scanner on my android phone which i use for debugging my applications. When i use the ZXing application it scans the barcodes.
But when i open the ZXing from my android project with the following code which i found in another post here, it doesn't scan the barcode.I can see the red line in my phone's camera but it doesn't show the green dots that 'read' the barcode.
Calling barcode scanner on a button click in android application
Why could this happen?
Thanks in advance
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
尝试下面的代码。
这是我自己使用过的工作代码。
希望有帮助
try the code below.
It's working code I've used it myself.
hope it helps
请仅使用我们提供的预打包集成代码(如下所述),而不是调试您的 Intent 代码:http://code.google.com/p/zxing/wiki/ScanningViaIntent
Rather than debug your intent code, please just use the pre-packaged integration code we provide as described here: http://code.google.com/p/zxing/wiki/ScanningViaIntent
谢尔盖,上面的代码适用于 QR 码,不适用于条形码,您测试过条形码吗?
请让我知道任何使用 Zxing lib 处理条形码的人。
Sergey, above code will work for QR code, not for Barcode, have you tested for barcode.
Please let me know anyone work on barcode with Zxing lib.
我遇到了同样的问题,要解决更改
为
I had the same problem, to solve change the
to