Message type: OPEN_QR_SCANNER
Originator: Web
Min app version: TBD
Description
Similar to existing OCR scanner method
- This method will open a native screen containing a QR code scanner. When a QR code is detected, its decoded text will be returned as a result to the Web.
- It will also try to request the required permissions itself.
- It will only be available in Mein Blau and Mein O2.
Differences between iOS/Android
Required permissions in Android
<uses-permission android:name="android.permission.CAMERA"/>
Required permissions in iOS
The following entry is required in Info.plist
<key>NSCameraUsageDescription</key>
<string>Esta aplicación necesita acceso a la cámara para escanear y reconocer texto en imágenes</string>
Payload definition
Request Payload
timeoutMs?: number: Timeout in milliseconds before closing the scanner automatically if no QR code is scanned. Optional, default is 15000 milliseconds
Examples:
{"type": "OPEN_QR_SCANNER", "id": "web-2", "payload": { "timeoutMs": 5000 }}
Response Payload
data: string: Decoded data from the scanned QR code
Examples:
{"type": "OPEN_QR_SCANNER", "id": "web-2", "payload": { "data": "https://some.decoded.url" }}
Possible error cases
- 204: User manually closed QR scanner
- 401: Missing permissions (user rejected camera permissions)
- 405: Feature not supported in current brand (only available in Mein Blau and Mein O2)
- 408: Timeout reached without scanning any QR code
- 500: Internal error (e.g., unexpected error thrown by native scanner)
Message type:
OPEN_QR_SCANNEROriginator: Web
Min app version: TBD
Description
Similar to existing OCR scanner method
Differences between iOS/Android
Required permissions in Android
Required permissions in iOS
The following entry is required in
Info.plistPayload definition
Request Payload
timeoutMs?: number: Timeout in milliseconds before closing the scanner automatically if no QR code is scanned. Optional, default is 15000 millisecondsExamples:
{"type": "OPEN_QR_SCANNER", "id": "web-2", "payload": { "timeoutMs": 5000 }}Response Payload
data: string: Decoded data from the scanned QR codeExamples:
{"type": "OPEN_QR_SCANNER", "id": "web-2", "payload": { "data": "https://some.decoded.url" }}Possible error cases