You now have access to a brand new QR code reader element in the WeWeb toolkit:
This element comes with 2 in-built variables:
The "QR Code Reader - cameras" variable lists all the cameras found on the device that is accessing the app.
By default, the element will activate the user's default camera. But you allow users to choose the camera they want to use to scan a QR code.
In the example below, we bound the list of cameras found by the QR code reader to a select element:
When a user scans a QR code, the "QR Code Reader - code" variable will be updated with the value referenced by the QR code, for example a URL.
In the example below, you can see we scanned a QR code that referenced WeWeb's Twitter account:
Depending on your use case, you may want to trigger a workflow when a user scans a QR code, to display a modal for example.
For these use cases, you'll find a pre-built workflow on QR code reader element that triggers "On scan".
Sign up now, pay when you're ready to publish.