ChronoFence
Private, geofenced time tracking designed around the imperfect reality of mobile location events.
ChronoFence is an Android time tracker for contractors who move between work sites. Define a geofence around a location and the app records arrival and departure, then turns those visits into billable timesheets.
The simple version of that idea is a geofence callback connected to a clock. The reliable version has to deal with delayed events, missed exits, device restarts, permissions, power management, manual corrections, billing rules, and the fact that location data deserves particular care.
Local by design
All locations, visits, rates, and reports remain on the device. There is no account and no application server. Reports leave only when the user explicitly exports or shares a CSV or PDF; network access is otherwise limited to OpenStreetMap tiles while choosing a location.
Room is the single source of truth, with DataStore used for preferences. Raw clock times are preserved exactly as recorded. Rounding, breaks, rates, and overtime are calculations applied when a report is generated, keeping the underlying history auditable.
Geofencing is a hint
Mobile geofence events are optimized for battery life rather than invoices. They may arrive late, and sometimes an exit never arrives at all.
ChronoFence therefore uses a hybrid tracking engine. Low-power Google Play Services geofences initiate a session. While it is open, a short-lived foreground service periodically obtains a real location fix and closes the session when the device has clearly left the radius or exceeded a configured maximum duration. Duplicate entries are ignored, and recurring pause schedules can suppress automatic tracking without preventing a manual clock-in.
Because automation will never be perfect, manual control is a first-class feature rather than an embarrassing fallback. Entries can be inserted, edited, or deleted. A Quick Settings tile and home-screen widget provide one-tap clocking.
From visits to invoices
Locations can stand alone or belong to a company with shared rules. The reporting layer handles hourly rates, configurable rounding, automatic breaks, daily overtime, and weekly, bi-weekly, or monthly periods with per-client subtotals.
The application is Kotlin with Jetpack Compose, MVVM and StateFlow, Room, WorkManager, and osmdroid. The repository includes deterministic debug hooks and GPX playback scripts because emulator geofencing is too unreliable to be the only way to exercise the state machine.
ChronoFence has been a useful reminder that robust automation begins by taking unreliable inputs seriously.