Skip to content

New method to open QR scanner flow #266

@yamal-alm

Description

@yamal-alm

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)

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions