Home About Projects Blog Graph Resume Contact 中文
Back to list
2026年8月28日

WorkCount

An Android time-tracking app built with Kotlin and Jetpack Compose that deducts breaks automatically and produces weekly and monthly reports.

#Kotlin#Jetpack Compose#Android#WorkManager

Log when work starts, when it ends and how long the breaks were, then find out how much was actually done. I needed it, so I wrote it.

What I built

  • Records: clock-in and clock-out times with any number of breaks in between, each carrying a reason, a pause time and a resume time.
  • Effective-hours calculation: the core logic. Breaks are clipped to the work interval, overlapping breaks are merged before being deducted, and shifts crossing midnight still add up — producing effective minutes and break minutes for the day.
  • Reports: weekly and monthly summaries, with Monday as the start of the week, showing effective time and break count per day.
  • Calendar integration: reads upcoming events from the device calendar and raises a reminder dialog.
  • AI assistant: backed by DeepSeek with a “work care” persona that suggests concrete actions — drink water, stand up, wrap up — instead of platitudes.
  • Settings: the API key is stored encrypted with security-crypto.

Stack

Kotlin + Jetpack Compose (Material 3) + WorkManager + kotlinx.serialization, with a paper-like off-white palette.

Tests

The hour calculation and the AI logic both have unit tests, with separate coverage for the edge cases: crossing midnight, breaks outside the work interval, and overlapping breaks.