What Inspired Us
We built Nudge because we lived the problem. As university students, we'd open Instagram "for 5 minutes" and look up 45 minutes later. YouTube autoplay, doom scrolling, notification loops — it was killing our focus and we knew it. Existing apps just hard-blocked everything, which felt like punishment. We wanted something smarter. Something that nudges you instead of fighting you.
How We Built It
Nudge is a native Android app built in Kotlin with Jetpack Compose for the UI.
The core tracking runs through Android's UsageStatsManager API, while the overlay
nudge popup uses AccessibilityService to detect foreground app changes in real time.
Key components:
- MVVM architecture with
ViewModel+StateFlowfor reactive UI - Room database for storing per-app limits and breach history
- AccessibilityService for detecting when a tracked app is opened
- SMS Manager for the accountability partner alert system
- Jetpack Compose for all screens — onboarding, dashboard, progress, accountability
The math behind the grace period system is simple but effective. Each "Continue Anyway" tap resets a $t = 15$ minute timer. After $n = 5$ overrides, the accountability SMS fires:
$$\text{SMS sent when } \sum_{i=1}^{n} \text{override}_i \geq 5$$
What We Learned
- Android's permission model is brutal — especially on MIUI/Xiaomi devices where UsageStats access behaves differently
- Behavioral design is harder than technical design. Getting the nudge popup to feel helpful and not annoying took multiple iterations
- MVVM architecture genuinely saves you when the app grows — we refactored once and it was painless after that
- Real accountability (SMS to a human) works better than any notification ever will
Challenges We Faced
The biggest challenge was accurate usage tracking. Android's UsageStatsManager
reports in intervals, not real-time, so we had to build a polling loop inside a
foreground service to stay accurate without draining battery.
The second challenge was MIUI compatibility. Xiaomi phones restrict background services aggressively, so we had to add specific guidance for users to whitelist Nudge in battery settings.
Finally, designing the overlay nudge that appears over other apps required
careful handling of TYPE_APPLICATION_OVERLAY window permissions on Android 12+,
which changed significantly from earlier versions.
Built With
- android-studio
- jetpack
- kotlin
- mvvm
- room

Log in or sign up for Devpost to join the conversation.