Enterprise Attendance Platform
Two attendance apps for two kinds of worker.
- Role
- Lead Mobile Engineer
- Platforms
- iOS, Android
- Year
- 2025
- Client
- Under NDA
Enterprise workforce attendance for a Dubai client, built as two applications for two very different users.
The first is a shared tablet at the site entrance, where non-technical workers clock in one after another by face while their managers watch, so the camera is opened, torn down and reopened continuously all shift. The second is a personal mobile app for technical staff, carrying the fuller set: geofencing, face verification with liveness, leave and regularisation requests, shift schedules and downloadable reports. Both run on the budget Android hardware the workforce actually carries. I built the clients; the backend was someone else's.
- 2
- apps: shared tablet and personal mobile
- 66%
- less face-detection CPU after the rebuild
- Flutter
- Riverpod
- Google ML Kit
- Dio
- Entra ID
- MapTiler
- Geolocator
How it fits together.
Capture
Camera Stream
1-in-3 frame throttle
Capture
Geolocator
8s timeout · 3-min cache
Verification
ML Kit Face
On-device liveness
Verification
Geofence Check
Radius enforcement
Verification
Anti-Spoof
Root · emulator · mock GPS
Resilience
Offline Queue
Encrypted punch ledger
Syncs on reconnect
Resilience
Dio Interceptors
Retry · 401 guard
Backend
Entra ID SSO
OAuth2 · PKCE
Backend
HRMS Backend
Attendance records
How it was built.
Face detection on-device, not in the cloud
- Problem
- Cloud face-verification APIs mean uploading a multi-megabyte frame per punch. On site 4G with hundreds of workers clocking in at shift change, that is slow, expensive, and it puts biometric imagery on the network.
- Approach
- Google ML Kit running on-device for face detection and a custom liveness guard checking orientation, distance and single-person-in-frame to defeat photo replay. Only verified metadata and a small audit snapshot leave the phone.
- Trade-off
- Sub-second verification independent of network quality, with raw biometric frames never transmitted.
Surviving a camera that never gets to rest
- Problem
- On the shared tablet, workers clock in back to back at shift change: the camera is initialised, used and disposed of dozens of times in a few minutes. Streaming every frame into ML Kit pinned the CPU on low-end MediaTek and Snapdragon devices, and reopening the camera that rapidly locked up the OS camera daemon outright, which stops the queue, in front of a queue.
- Approach
- Frame throttling with a detection lock, so one frame in three reaches the model, plus a 300ms OS resource-release delay and an explicit stream stop before disposal, so the daemon is never asked for a handle it has not finished releasing.
- Trade-off
- 66% lower CPU load with liveness accuracy unchanged (faces do not move meaningfully between consecutive frames at 30fps), and a camera that survives being reopened all shift.
Assuming GPS will fail
- Problem
- Workers clock in indoors, in lobbies and warehouses where satellite lock can take five seconds or never arrive. A blocking GPS call freezes the UI while a queue builds behind them.
- Approach
- An 8-second hardware timeout falling back to last known position, a 3-minute in-memory coordinate cache so reopening the screen reuses a valid fix, and incrementing request IDs so a slow stale fix cannot overwrite a newer one.
- Trade-off
- The queue keeps moving. Cached coordinates are slightly less precise, acceptable against geofence radii measured in tens of metres.