Current digital-wellbeing tools are time-aware. They can tell you:
"You've used Facebook for 45 minutes."
But time alone doesn't answer the more important question:
"Is this still what I meant to be doing?"
Someone unlocks their phone to call Anna at 4 PM. They open Facebook to check one message. Forty minutes later, they've forgotten the original task entirely.
Traditional Screen Time knows Facebook = 42 minutes.
GuideBack also knows your self-declared intention: Call Anna at 4 PM.
GuideBack is an intent-recovery companion — not another screen timer, not a blocker, not a parental control.
When your phone use drifts away from what you meant to accomplish, GuideBack gently helps you return to your original intention.
Android Usage Signals
↓
Deterministic Drift Engine
↓
Drift Score
↓
threshold?
/ \
NO YES
↓
Privacy-Reduced Context
↓
Gemma 4
↓
Personalized Intervention
↓
User's Choice
Pure Kotlin code determines:
- Current app and session duration
- Expected (baseline) session length
- App-switching frequency and return loops
- Whether current activity matches the intended task
- A weighted drift score (0–100)
Gemma does not decide whether 42 minutes > 15 minutes. Ordinary code does that perfectly.
Once the deterministic engine crosses the intervention threshold, Gemma transforms structured behavioral context into a personalized, respectful intervention:
"You've been on Facebook longer than usual. You wanted to call Anna. Want help getting back?"
Gemma handles tone, language, personalization, and concise wording.
- Model: Gemma 4 26B-IT (Instruction-Tuned)
- Access: Google AI Studio API (generativelanguage.googleapis.com)
- What Gemma receives: Minimal sanitized context (app name, session length, baseline, intention, overdue status)
- What Gemma does NOT receive: Raw usage-event history, phone numbers, message contents, or browsing history
- Fallback: If Gemma fails or times out (8s), the app uses deterministic fallback copy — Gemma enhances the experience but never becomes a single point of failure
Detecting behavior drift is not the same problem as communicating help respectfully. Deterministic software can say drift = 86. But intervention quality depends on context, language, tone, and the user's preferences. Gemma turns behavioral state into human assistance.
- Usage analysis happens locally on the device
- Only a minimal, synthesized context is sent to the Gemma API for text generation
- No raw usage-event history is transmitted
- No accounts, no cloud database, no authentication
- No data leaves the device except the intervention generation request
The drift score combines four weighted signals:
| Signal | Weight | Description |
|---|---|---|
| Session Overrun | 45% | How far current session exceeds baseline |
| Intent Mismatch | 30% | Whether user is in wrong app with overdue task |
| App Switching | 15% | Rapid cross-app switching pressure |
| Return Loops | 10% | Repeatedly returning to a distracting app |
Threshold: Score ≥ 68 triggers intervention.
The formula is entirely explainable — no ML needed for this part.
To make the 2-minute demo reproducible, we inject a deterministic 43-minute Facebook scenario:
User: Maria
Intention: Call Anna at 4:00 PM
Current app: Facebook (43-minute session)
Usual session: 14 minutes
App switches: 8
Intent overdue: 18 minutes
The demo data flows through the same drift engine, Gemma inference pipeline, intervention UI, and action routing as real usage. Demo Mode provides deterministic sample usage context so judges can reproduce the behavior without waiting 43 real minutes.
Designed initially for older adults — people who benefit from simpler smartphone guidance, contextual reminders, and help recovering from navigation mistakes.
GuideBack is assistive, not paternalistic. It does not diagnose, restrict, or judge. The user remains in control.
- Language: Kotlin
- UI: Jetpack Compose + Material 3
- State: ViewModel + StateFlow
- Local storage: Not required for P0
- Permissions:
INTERNET(Gemma API),PACKAGE_USAGE_STATS(future UsageStats integration)
| Component | Purpose |
|---|---|
DriftEngine |
Pure Kotlin deterministic drift scoring |
InterventionGenerator |
Interface for generating intervention text |
GemmaInterventionGenerator |
Calls Gemma 4 via Google AI Studio API |
FallbackInterventionGenerator |
Deterministic fallback if Gemma fails |
DemoUsageSource |
Reproducible demo scenario |
IntentionRepository |
Manages user intentions |
GuideBackViewModel |
Orchestrates app state |
- Android SDK (API 36)
- JDK 17
- Google AI Studio API key with Gemma 4 access
- Clone the repository
- Add your Gemma API key to
gradle.properties:GEMMA_API_KEY=your_api_key_here - Build and run:
Or use the Android CLI:
./gradlew assembleDebug
android run
- Launch GuideBack → Tap "GET STARTED"
- Tap "LOAD DEMO SCENARIO" → Sets up Call Anna intention
- Tap "RUN DEMO ANALYSIS" → Drift engine evaluates the scenario
- See Gemma 4's personalized intervention
- Tap "CALL ANNA" → Phone dialer opens
- Return → Demo is repeatable
- Gemma on-device: LiteRT-LM for Gemma 4 E2B on-device inference is the ideal architecture. Time constraints led us to use the API path, which still uses genuine Gemma 4 models.
- Android UsageStats: Real-time foreground app detection requires careful session modeling. Demo Mode ensures a reliable hackathon flow while the real pipeline is implemented.
- Edge-model deployment: Balancing model capability, latency, and privacy is a core engineering challenge that this architecture is designed to evolve with.
- The distinction between detecting drift (deterministic) and communicating help (generative) is architecturally powerful
- Small, focused model tasks (generate one intervention sentence) are ideal for edge/mobile deployment
- Privacy-first AI design is a feature, not a constraint
- Respectful interaction design for older adults requires constant attention to language, visual hierarchy, and cognitive load
- On-device Gemma: Migrate to LiteRT-LM with Gemma 4 E2B for fully local inference
- Real UsageStats integration: Live foreground monitoring with foreground service
- Notification-based interventions: Intervene when the user is in another app
- Multilingual support: Gemma generating interventions in Spanish, Malayalam, and more
- Personalized baselines: Learn individual usage patterns over time
- Additional intention types: Reminders, app-specific goals, timed tasks
- Overlay interventions: In-app guidance cards
Prize tracks: Best Use of Gemma 4 · Best Hack for Good
Team: Built at RenderATL 2026, Atlanta, GA
Screen Time tells you to stop. GuideBack remembers what you were trying to do.