如何将条形码扫描器实现为独立应用程序 [英] how to implement barcode scanner as a standalone application
本文介绍了如何将条形码扫描器实现为独立应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我编写的代码使用手机中安装的现有条形码扫描仪来扫描代码。现在我想让它独立于我的应用程序。我该怎么做呢。我读过一些博客,上面写着整合zxing库并使用intentIntegrator。我已经尝试了很多,但应用程序崩溃了。应该如何正确地完成。请给我你的指导。
i have written a code that uses an existing barcode scanner that has been installed in the phone to scan codes. now i want it to be stand alone for my app. how can i achevie it. i have read blogs that says integrate zxing library and use intentIntegrator. i have tried a lot but the app crashes. how should it be done correctly. please give me your guidence.
推荐答案
这很容易。您只需要获取预览数据并使用ZXing对其进行解码。您可以阅读博客 - 如何实现简单的条形码在Android上扫描应用程序 [ ^ ]
It's pretty easy. You just need to get the preview data and decode it with ZXing. You can read the blog - How to implement a simple barcode scan application on Android[^]
这篇关于如何将条形码扫描器实现为独立应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文