JavaScript QR Code Reader - can it be done? Or, Remote Service?

后端 未结 5 858
你的背包
你的背包 2020-12-14 08:24

I\'m doing a bit of preliminary research on an upcoming project and I have a quick question that I figure I\'ll throw up here while I look elsewhere, in case anyone has any

5条回答
  •  一整个雨季
    2020-12-14 08:56

    Because of memory limits for JavaScript on mobile devices, it's likely to take too long for practical use, if it is possible with purely JS.

    I don't know exactly how the Appcelerator API works with external native libraries, but your best bet is to pass the image data to the native code (Objective-C or Java) and then use a lower-level library (like iphone-qrcode) to parse the QR code, then pass the result back to the JS execution context.

    This has the added advantage of working offline, which a remote service could not do.

提交回复
热议问题