A Karoo 3 extension that provides adaptive nutrition reminders during rides. The timer adjusts intervals based on your power zones — harder riding triggers more frequent nutrition alerts.
- Adaptive nutrition timing — intervals shorten automatically in higher power zones (Z3+ = more frequent)
- Custom data field — large MM:SS countdown displayed on any Karoo data page
- Color-coded urgency — white (>5min), yellow (<5min), red (<2min)
- In-ride alerts — native Karoo notifications with vibration
- Nutrition plan management — create plans with gels, drinks, bars on customizable intervals
- Power zone integration — uses Coggan's 7-zone model based on your FTP
- Post-ride summary — review consumption history and export CSV
- Fully offline — works without connectivity during rides
-
GitHub Personal Access Token with
read:packagesscope- Create at: https://github.com/settings/tokens
- Required because karoo-ext SDK is hosted on GitHub Packages
-
Android SDK with API 34
-
Clone this repository:
git clone <repo-url> cd karoo-nutrition
-
Add GitHub Packages credentials to
~/.gradle/gradle.properties(global, not committed):gpr.user=your-github-username gpr.key=your-github-personal-access-token
Or set environment variables instead:
export GITHUB_USERNAME=your-username export GITHUB_TOKEN=your-token
-
Create
local.propertiesin the project root (if not present):sdk.dir=/path/to/your/Android/sdk -
Build the debug APK:
./gradlew assembleDebug
-
Enable Developer Mode on Karoo:
- Settings > About > Tap build number 7 times
- Settings > Developer Options > Enable USB Debugging
-
Connect via USB and install:
adb install -r app/build/outputs/apk/debug/app-debug.apk
- Open Nutrition Timer from the Karoo app menu
- Create a nutrition plan:
- Set your FTP (watts)
- Add items (gel every 45min, drink every 20min, etc.)
- Activate the plan
- Add the Nutrition Countdown data field to any data page
- The countdown shows time until next nutrition item
- When the timer reaches zero, you'll get an alert with vibration
- Intervals adjust based on your current power zone:
- Z1-Z2: Base interval (no change)
- Z3-Z4: -10 minutes
- Z5-Z6: -15 minutes
- Z7: -20 minutes (minimum 5 minutes)
- Open the app to view ride history
- Export consumption logs as CSV
NutritionTimerExtension (KarooExtension service)
├── NutritionCountdownDataType (DataTypeImpl)
│ ├── startStream() → emits countdown seconds
│ └── startView() → renders RemoteViews with countdown
├── TimerManager (core countdown logic)
│ ├── Observes elapsed time + power via KarooSystemService
│ ├── Computes power zones and adjusts intervals
│ └── Dispatches InRideAlert when nutrition is due
└── NutritionDatabase (Room)
├── NutritionPlan → NutritionItem (1:many)
└── RideLog (consumption events as JSON)
- Kotlin with Coroutines + Flow
- karoo-ext SDK 1.1.8
- Room Database for persistence
- kotlinx-serialization for JSON
- Min SDK 23 / Target SDK 34
MIT