QR-/barcode scanner
Use this integration for a fast QR- and barcode scanning experience.
Introduction
This integration allows the app to scan QR- and barcodes in a fast and relieable way using the camera on the device.
Integration name: startiapp.QrScanner
Methods
scan
scan(): Promise<string>
Opens the camera on the phone and starts scanning for QR- and barcodes. When the camera scans a code the camera will be closed and the client user will be back on the website.
isCameraAccessGranted
isCameraAccessGranted(): Promise<boolean>
Returns a boolean indicating where access to the camera has been granted.
getCameraAccessState
getCameraAccessState(): Promise<"Unknown" | "Granted" | "Denied">
Returns a string indicating state of access to the camera:
Unknown
means access has not been requested yetGranted
means access has been grantedDenied
means access has been denied
requestCameraAccess
requestCameraAccess(): Promise<boolean>
Asks the user about access to the camera on the device. Returns a boolean indicating wether the call completed successfully or not. So the value can’t be used to determine if there are access to the camera. Here a following call to isCameraAccessGranted()
is necessary.
Events
This module does not currently offer any events.