Kap

Water intake tracking for Android. A one-tap home-screen widget, reminders that arrive on time, and a daily goal worked out from you.

“kap” is Serbian for “drop”.

01 · the widget

Tap. Drink. Done.

The whole point of Kap is the home-screen widget: today's progress and one-tap buttons for the amounts you actually drink. This one works; the glass beside it is your day.

Water Intake

0 ml / 3,316 ml

Stay hydrated! Keep it up!

0%

Today

  1. Nothing yet. Tap a button.

The real widget is a Jetpack Glance widget; its buttons are the quick-add volumes you set in the app (100, 250, 500, 750 and 1000 ml by default). It took three implementations to get here. The devlog has the story.

02 · your goal

A goal worked out from you

On first launch Kap asks for your age, weight and daily activity and suggests a goal, the same formula as below. Type over it to set your own.

—

    From calculateOptimalWaterIntake(): 33 ml per kg of body weight, plus 350 ml per hour of activity, plus 200 ml under 18 or minus 200 ml from 55. A rule of thumb, not medical advice.

    03 · reminders

    Reminders that land on time

    Pick a window and an interval. Kap schedules one alarm at a time with AlarmManager.setWindow() and a five-minute flex, then schedules the next when it fires. Drag “now” to see where the next one lands.

    The rule, from NextTickCalculator: before the window, the next reminder is at its start; inside it, round up to the next interval and stay inside the window; after it, tomorrow's start. A BootReceiver puts the alarm back after a restart. It replaced a WorkManager chain that delivered reminders “eventually”.

    04 · the app

    What's inside

    Kap widget preview: Water Intake, 2500 ml of 3316 ml, buttons +200, +250, +500, +750, +1000 ml, Stay hydrated! Keep it up!
    The widget's own preview image, from the app.

    05 · build log

    How it got here

    1. Started Kap. “I keep forgetting to drink water, so I'm building an app that nags me about it.” Room database, navigation, a home screen.
    2. The widget took four tries. XML AppWidgetProvider, no widget at all, then Jetpack Glance, then Glance made to look decent. Notifications fired for the first time.
    3. Tried to get the watch talking to the phone. A Wear OS module and a message client; the round trip didn't work yet. The app became translatable.
    4. WorkManager was never going to give exact timing. Reminders moved to AlarmManager, with a boot receiver. Health Connect groundwork went in after.

    Read the full devlog →

    06 · get it

    Build it yourself

    Kap isn't on Google Play. It builds from source with Android Studio or Gradle and runs on Android 8.0 and newer.

    git clone https://github.com/stcksmsh/Kap
    cd Kap
    ./gradlew :app:installDebug    # phone connected with USB debugging on

    Kotlin, Jetpack Compose with Material 3, Room, Jetpack Glance, Vico charts, AlarmManager, Health Connect client. The watch module needs Wear OS 3 (API 30).