PAM Native Scanner
Start here
Section titled “Start here”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:
curl -fsSL https://github.com/push-in/pam/releases/latest/download/install.sh | shpam doctorpam init my-app --template nativecd my-apppam composer require pushinbr/pam-native-scannerpam doctorpam native devreturn 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.