包含带有 PhoneGap 的 QR 扫描仪应用程序
我开始编写一个应用程序,需要嵌入二维码读取功能。这意味着我基本上希望在我的应用程序内部有一个选项来扫描二维码,然后执行一些与我的应用程序相关的逻辑。
我得到了关于如何在 Android 中执行此操作的一些解释(尽管还没有还没尝试过),但既然我决定使用 PhoneGap,我想知道它是否会改变什么。
使用 PhoneGap 是否意味着我将有一种通用方法将 QR 扫描仪应用程序包含在我自己的应用程序中,或者我仍然需要处理 QR 扫描仪应用程序(包括每个平台)?
I starting to write an application that will need to have a QR code reading capabilities embedded in it. Meaning that I basically want to have an option from inside my application to scan a QR code and then perform some logic related to my application.
I got some explanations about how to do it in Android (though haven't tried it yet), but now that I've decided to use PhoneGap I want to know if it changes anything.
Does the usage of PhoneGap mean that I will have a generic way to include a QR-scanner application inside my own application, or do I still need take care of the QR-scanner application including for every platform?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
此类高级功能需要 PhoneGap 插件,并为每个平台提供本机实现。请参阅http://wiki.phonegap.com/w/page/36752779/PhoneGap%20Plugins
好消息是 BarcodeScanner 插件已经在 Android、BlackBerry 和 iOS 上实现,请参阅https://github.com/phonegap/phonegap-plugins
该插件支持一维条形码以及二维码和其他二维码集成 ZXing (http://code.google.com/p/zxing/)
请注意,目前,在 PhoneGap 应用程序中集成插件需要针对每个平台采取不同的过程。请参阅上面引用的 PhoneGap Wiki 以及构建和构建。每个插件的自述文件中的安装说明。
Advanced features like this require a PhoneGap plugin, with an native implementation for each platform. See http://wiki.phonegap.com/w/page/36752779/PhoneGap%20Plugins
The good news is that the BarcodeScanner plugin is already implemented for Android, BlackBerry and iOS, see https://github.com/phonegap/phonegap-plugins
This plugin support 1D barcodes as well as QR codes and other 2D codes by integrating ZXing (http://code.google.com/p/zxing/)
Note that for now, integrating a plugin in a PhoneGap application needs a different procedure for each platform. See the PhoneGap Wiki referenced above as well as build & install instructions in the README file for each plugin.