Skip to content

chwagssd/qr

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Note: the following script will take 5-10 seconds to decode a scanned QR code on an iPhone 4s.

move these files into your project

point to <script src="path/to/decoder.js"><script>

Create a file input in your HTML page that has an id, say "xxx" <input type="file" id="xxx">

Then tell the page on load to QRIfy your field! Make sure to include your callback function, which will be called with a single argument (the FULL TEXT that was scanned): QRIfy('qrCode', onQrCode);//where qrCode is the id of your <input type="file" id="xxx">

Basically, after you have a file field, then ondomready or on page load, call the following:

QRIfy('qrCode', callback);

where callcack is:

<body> <form> <input type="file" id="qrCode" /> </form> </body>

<script> callback = function(data){ alert("We found this data in the scanned code:" + data); } QRIfy('qrCode', callback); </script>

About

Convert an iOS file input to a qr code scanner (will call your callback upon success)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published