Convert an iOS file input to a qr code scanner (will call your callback upon success)
Switch branches/tags
Nothing to show
Latest commit e0de4e7 Dec 22, 2012 @chwagssd chwagssd Update README.md
Permalink
Failed to load latest commit information.
dependencies All files for scanner Dec 22, 2012
.DS_Store All files for scanner Dec 22, 2012
.project All files for scanner Dec 22, 2012
README.md Update README.md Dec 22, 2012
decoder.js All files for scanner Dec 22, 2012

README.md

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>