QR Code

The QR Code API is an HTTP API that can be use for creating custom QR Codes programmatically.

app.qrCode.onReceived()

The app.qrCode.onReceived is for When you use QR technology in your project, you can handle the data received from QR in this event and call on any page to be displayed to user with app.qrCode.start event.

  • Type: Function

    app.qrCode.onReceived = function (data) {};

  • Detail

    The app.qrCode.onReceived has one parameter that named data.

    Parameters Type Description
    data Object Contain the QR information.
  • Example
    Performing an QR code management inside the app.js:
    // on QR Code data received
    app.qrCode.onReceived = function (data) {
        if (data)
            homePage.show();
    };

app.qrCode.start()

The app.qrCode.start is for When you use QR technology in your project, you can handle the data received from QR in this event and call on any page to be displayed to user with app.qrCode.start event.

  • Type: Function

    app.qrCode.start();

  • Detail

    The app.qrCode.start is used for when we want to use the QR Code inside the app.

  • Example
    Performing an QR code call inside the app.js:
    app.security.ensurePermissions({android: {0: 'android.permission.CAMERA'}}, function (granted) {
        if (granted)
            app.qrCode.start();
        else
            app.controls.box('alert', null, 'Grant access to a camera to scan the barcode.', 'left');