Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Javascript QR code reading libraries [closed]

I wish to use QR codes in a PhoneGap-based mobile app. There are several ways to generate QR codes using javascript. I'm using Jerome Etienne's jquery-based solution.

I'm looking for a pure Javascript solution or a set of PhoneGap plugins for the camera-enabled platforms that will read QR encoded data in an image.

So far all I've found is a demo by LazarSoft. Are there any other solutions?

like image 830
Alec Wenzowski Avatar asked Oct 12 '11 00:10

Alec Wenzowski


People also ask

What stops a QR code from working?

If you're holding your phone too close or too far away, it won't scan the code. Try holding your phone about 30 cm (1 foot) away and slowly moving it towards the QR code. Some phone cameras can't focus as well as others close up, so you may have to hold your phone a bit further away.

Are we going to run out of QR codes?

The complexity of a QR code also means that there are a practically infinite number of possible permutations — everyone on earth can assign a unique QR code to every photo, link, and product ever created, and we'll never run out.

Can not read QR code?

If your Android device is not scanning a QR code, make sure the code is properly framed on your screen. Cleaning your camera lens and getting better lighting on the code are other potential solutions. You can also try using Google Lens or a third-party QR code app.

How do I reopen a QR code?

It's not possible to reactivate a QR Code by creating and upgrading a new account. It's also not possible to reactivate another QR Code by creating a new QR Code with the same content.


2 Answers

UPDATE I finally put up my demo using jsqrcode. Try it here.

These http://www.webqr.com/ guys have actually ported the ZXing qrcode scanner to javascript https://github.com/LazarSoft/jsqrcode !!

The only thing you need the flash thing for is to use the webcam (in their examples). The javascript decode and detection works on canvas elements.

I'm currently using the HTML5 Camera API and the javascript bits from LazarSoft to detect and decode QR codes in the browser. Pure web :-D

For desktop testing set the Enable MediaStream flag under chrome:flags, or get the camera bundled client from Opera Labs http://snapshot.opera.com/labs/camera/

like image 192
asbjornenge Avatar answered Oct 10 '22 02:10

asbjornenge


This is the current go to library for barcode scanning: https://github.com/wildabeast/BarcodeScanner

Now the official cross-platform BarcodeScanner for Cordova / PhoneGap https://github.com/phonegap/phonegap-plugin-barcodescanner

like image 20
Bijan Avatar answered Oct 10 '22 02:10

Bijan