Skip to content

PAM Native Scanner

Every PAM Native product runs on the PAM runtime. Install and verify PAM first, create a Native application, and add this package through PAM Composer:

Terminal window
curl -fsSL https://github.com/push-in/pam/releases/latest/download/install.sh | sh
pam doctor
pam init my-app --template native
cd my-app
pam composer require pushinbr/pam-native-scanner
pam doctor
pam native dev
return ScannerView::make(BarcodeFormat::QrCode, BarcodeFormat::Ean13)
->duplicateInterval(1200)
->onResult(fn (ScanResult $result) => $this->accept($result));

ScannerView owns preview/analyzer; BarcodeFormat restricts symbologies; ScanResult normalizes value/format; ScannerEventKind reports result, permission, and native failure; CameraFacing chooses lens.

The analyzer keeps only the newest frame, works off UI, closes every image proxy, and suppresses duplicate values for the configured interval. Android bundles ML Kit so first use needs no model download. Request permission before mount, limit formats for speed, and validate scanned data before navigation, network, or payment actions.

BarcodeValueKind classifies unknown, text, URL, email, phone, SMS, Wi-Fi, contact, calendar, geo, driver-license, ISBN and product payloads with sequential integer cases. ScannerPluginProvider registers ScannerView automatically.