CheckPass is an Android app designed to streamline passenger check-in for buses by enabling agents to quickly scan QR codes on tickets, instantly retrieving and displaying passenger details for check-in or cancellation.
-
Dual Scanning Support:
- PDA Devices: Uses built-in scan hardware via a
BroadcastReceiverimplementation. - Camera Phones: Utilizes CameraX and MLKit for QR code scanning, leveraging
setImageAnalysisAnalyzerfor live code detection.
- PDA Devices: Uses built-in scan hardware via a
-
Unified Codebase:
- Scanning logic is abstracted via the
ScannerManagerinterface:interface ScannerManager { val scannedCodes: SharedFlow<String> fun startScan() fun stopScan() }
- Device detection at runtime chooses the appropriate implementation (
BroadcastScannerManagerfor PDAs,CameraScannerManagerfor camera phones).
- Scanning logic is abstracted via the
-
Reactive Scanned Code Handling:
- QR codes scanned are delivered using
SharedFlow<String>, allowing the app to respond immediately and display passenger dialogs.
- QR codes scanned are delivered using
-
Camera Permissions & Libraries:
- Camera usage on phones is managed with explicit permissions in the manifest.
- The Google Accompanist library is used for elegant runtime permission handling.
- Agent scans the QR code on the passenger's ticket (either with the PDA's physical button or the phone's camera).
- Passenger details appear in a dialog; the agent can check in or cancel.
- Core logic adapts to device type automatically.
![]() |
|---|
- BroadcastReceiver for handling hardware scan events on PDA devices.
- CameraX’s setImageAnalysisAnalyzer for real-time QR detection on camera phones.
- Google Accompanist Permissions for runtime camera access.
- SharedFlow for propagating scanned QR codes to the UI.
CheckPass ensures a consistent, fast, and reliable check-in experience across device types by abstracting scanning logic and handling permissions gracefully.
