hansemannn / titanium-qrcode

A simple library for generating and scanning QR codes natively. Built with Swift (iOS) and Kotlin (Android) 🚀

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Titanium QR Code Generator & Scanner

A simple library for generating and scanning QR codes natively.

Example

import QRCode from 'ti.qrcode';

const win = Ti.UI.createWindow({
    backgroundColor: '#fff'
});

win.add(Ti.UI.createImageView({
    width: 200,
    height: 200,
    top: 30,
    image: QRCode.fromString('https://google.com')
}));


const btn = Ti.UI.createButton({
    title: 'Start scan',
    top: 250
});

btn.addEventListener('click', () => {
    QRCode.scan({
        callback: event => {
            alert('SUCCESS: ' + event.success + ', TEXT: ' + event.text || 'n/a');
        }
    });

    // iOS-only: Use "hideActiveScanner()" to hide the active scanner manually
});

win.add(btn);
win.open();

License

MIT

Author

Hans Knöchel

About

A simple library for generating and scanning QR codes natively. Built with Swift (iOS) and Kotlin (Android) 🚀

License:MIT License


Languages

Language:Objective-C 67.4%Language:Swift 21.7%Language:Kotlin 6.9%Language:JavaScript 2.6%Language:Ruby 1.4%