Zxing for iphone 使用 HTML5/javascript

发布于 2024-12-03 09:35:40 字数 139 浏览 3 评论 0原文

我是ios开发新手。

有人可以告诉我吗?是否可以使用 Zxing lib 在 iPhone 上扫描条码/二维码以获取 Web 应用程序(HTML5/javascript)?

我的意思是我的web应用程序需要使用Zxing,这可能吗?

i am new to ios development .

can anybody pls tell me . is it possible to use Zxing lib for scanning bar/qr-code on iPhone for a webapp(HTML5/javascript) ?

i mean my webapp needs to use Zxing , Is it possible ?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

一身软味 2024-12-10 09:35:40

条形码扫描需要使用手机上的摄像头,该设备无法从网络应用程序中使用,因此无论您想使用哪个库,都无法从网络应用程序中扫描条形码。

另外,我不认为你可以使用 javascript/html5 中的 C、C++、Objective C 库,这些库必须位于你的代码无法访问的手机上,并且你的浏览器肯定无法运行它。

一种替代方案是 PhoneGap,我对它不太熟悉,但它是一个围绕 Web 应用程序的 iOS(和/或 Android)外壳,作为本机应用程序运行。您可能会在那里获得相机支持,并且可能会使用 Zxing 库。您必须对此进行研究,但是您也不再“真正”拥有网络应用程序了。

编辑:对于phoneGap和Zxing另请参阅:如何使用phonegap扫描条形码

Barcode scanning requires use of the camera on your phone, this device is not available from a webapp and therefore you cannot scan barcodes from the webapp, regardless of the library you would like to use.

Also, I dont think you can use C, C++, Objective C libraries from your javascript/html5 these libs would have to be on the phone where your code cannot get to it, and your browser most certainly cant run it.

One alternative would be PhoneGap, I am not too familiar with it, but it is an iOS (and or Android) shell around a webapp that runs as a native app. You could probably get camera support in there and maybe use the Zxing lib. You would have to look into that, but then you dont 'really' have a webapp anymore either.

EDIT: For phoneGap and Zxing see also: how to scan barcode using phonegap

祁梦 2024-12-10 09:35:40

如今,您可以使用 HTML5 Camera API 和这个小美来让它工作; https://github.com/LazarSoft

尽情享受。

These days you can get it working with the HTML5 Camera API and this little beauty; https://github.com/LazarSoft

enjoy.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文