How to: Generate and Scan QR Codes
Overview
- On the Web, generate QR Codes for any data your want and download a printable PDF
- On the mobile, you can scan any bar code or QR code and decode its encoded value
Generate QR Codes
Use the QRCode class to generate one or more QR Code along with a label as a printable PDF document
function generateCodes() {} var gen = new QRCode() gen.add("12334455", "Product 1"); gen.add("79594868", "Product 2"); .... gen.download("My QRCodes"); }
Scan QR Code on mobile
Use the App.scanCode(onchange) static method of the App class to initiate a scan from the mobile app. The onchange parameter is the callback function. Use this.value as a function parameter to botain the decoded data.
function main() { var calllback = 'onscan(this.value)'); List.addButton("Scan Code", "App.scanCode({callback})"); List.show()); } function onscan(value) { List.addItemTitle("Decoded Data:" + value); List.show(); }