generateQRCode

Description

Creates an image for a type of matrix barcode (QR Code).

Input / Parameter

Output

N/A

Callback

callback

It is executed after the function completeled generating the matrix barcode (QR Code).

Example

In this example, we will generate a QR code and display it in an image component.

Steps

  1. Drag a button component and an image component to a page in the editor to display the generated QR code.

  2. Call the function Device.generateQRCode in the press event of the button component and set the required parameters to generate the QR code.

    value : test qrcode
  3. Call the function App.setComponentValue if the function Device.generateQRCode runs successfully and set the value to display the QR code in the image component.

  4. Call the function Log.write if the function Device.generateQRCode does not run successfully and set the value to print the response in the console.

Result

  1. The image component will display the QR code generated if the function is executed successfuly and the console will print the base64 string of the image if the function is not executed successfully.

Last updated