Skip to main content

Scanner

The Scanner widget reads QR codes and barcodes with the device camera.
When a scanned code is a web link, a banner at the bottom of the screen opens it right away, and you can use the scanned text in a script.

Definition and role

The Scanner widget draws a scan guide area over the camera preview and reads any QR code or barcode that enters it. On a successful scan, it stores the most recent scanned text and runs the onChanged action. Design mode shows preview guidance instead of the camera — run the app and the real camera takes over.

  • Category: Contents
  • Default scan target: QR code
  • Default camera: Rear
  • Default size (Sized Box): width infi, height 200

Features

FeatureDescription
QR and barcode scanningRead QR codes or 1D barcodes with the camera. Choose what to scan with formats.
Link bannerWhen a scanned code is an http or https link, a banner appears at the bottom of the screen; tap 열기 ("Open") to open the link in the in-app web view.
Most recent scanned textStores the text of the most recently scanned code and passes it to the onChanged action.
Camera and flash settingsChoose the front or rear camera, and turn the flash (torch) on.
Scan intervalAdjust the interval between scan attempts, in milliseconds, with detectionTimeoutMs.

How to use

  1. Open the Contents category in the left widget palette.
  2. Drag and drop the Scanner item onto the canvas.
  3. In the Properties panel on the right, set the scan target (formats), the camera direction (lensFacing), and other options.
  4. If needed, connect an action — logic or a script — to onChanged to run once a code is scanned.
  5. Run the app. The camera turns on and reads codes inside the scan area.

Properties

PropertyDescriptionDefaultValue / Type
lastScannedTextText of the most recently scanned codeNot setString
lensFacingCamera direction to useback (rear)back, front
torchEnabledTurn the flash (torch) onfalse (off)True / False
formatsType of code to scanqrqr, barcode
detectionTimeoutMsInterval between scan attempts (milliseconds)250Number (ms)
showLinkBannerWhether to show the link bannertrue (on)True / False

Notes and tips

warning

Because the widget uses the camera, real scanning works only while the app is running. Design mode shows preview guidance only, and the device camera permission is required.

tip

Set formats to barcode to read several 1D barcodes together, such as code128, ean13, and upc; set it to qr to read QR codes only. The banner does not appear again for the same link scanned within 2 seconds.

Learn more

tip

For the full set of Widget Control (Property, Method, Event) you can drive from a script, visit Scanner Widget Control.