App Features
QR Scanner
Open a native camera scanner through the JavaScript bridge and return scanned content with configurable result UI.
Before you start
- Camera permission enabled
- Website JavaScript that initiates scanning and handles results
Configure and verify
Enable camera access
Enable QR Scanner and camera permission, then save and rebuild.
Style the scanner
Configure page title, frame, scan line, and scan-line shadow colors for both themes.
Style result UI
Set dialog background, title and content colors, plus success, rescan, cancel, and copy controls.
Trigger scanning
Call webtoapp.openQrScanner() or send qr_scanner_init through postMessage.
Handle the result
Use webtoapp.onQRResult(value), webtoapp.onmessage, or the webtoapp QR event in your page. Validate the scanned value before navigating or performing an action.
Test permissions and cancellation
Test first permission grant, denial, no camera, cancel, rescan, copy, and malformed QR content.
Bridge example
webtoapp.openQrScanner({ enable_confirmation_popup: true });
webtoapp.onQRResult = function (value) {
console.log("Scanned:", value);
};Security
Test before release
- Camera prompt appears
- Scanner frame is visible
- Cancel and rescan work
- Result reaches the website
- Unsafe values are rejected