FocusFlow
Focus. Execute. Win.
The problem FocusFlow solves
What Problem Does This App Solve?
The Core Challenge
Students and professionals struggle with productivity blind spots. They don't realize:
When they're burning out until it's too late
Which hours they're actually productive vs. just "busy"
How distractions are silently killing their focus
Whether they're on track to meet their goals
How This App Helps
🎯 Prevents Burnout Before It Happens
Instead of crashing during exam week, you get early warnings when fatigue builds up. The app tracks typing patterns, screen time, and work intensity to predict burnout risk days in advance.
⚡ Finds Your Peak Performance Windows
Discover when YOU specifically focus best. Maybe you're a morning person but forcing night study. The app analyzes your patterns and recommends optimal study schedules tailored to YOUR brain.
📊 Makes Progress Visible & Motivating
Turn invisible effort into tangible achievements. See your focus hours climb, unlock badges, compete with peers, and get AI-powered insights that keep you motivated.
🛡️ Blocks Distractions Intelligently
Not a harsh blocker—smart protection. The app learns which apps derail you during study time and offers Emergency Focus Mode when you need nuclear-level concentration (exam week, deadlines).
👥 Builds Accountability Through Community
Study feels less lonely when you see peers grinding alongside you. Join leaderboards, take challenges together, and get that extra push from friendly competition.
đź§ Provides Data-Driven Coaching
Get personalized recommendations like:
"You're 23% more productive after morning exercise"
"Avoid Physics after 8 PM—your error rate spikes"
"Take a rest day—your fatigue is at 75%"
Perfect For
Exam prep (JEE, NEET, competitive tests) where every hour counts
Skill building (coding, languages) requiring consistent focus
Anyone who feels busy but not productive
Students who want parental support without micromanagement
People prone to burnout who need data-driven self-care
Bottom Line
This isn't just a time tracker. It's a personal performance coach that learns your patterns, predicts problems, keeps you accountable, and helps you work smarter—not just harder.
Challenges we ran into
Challenges I Ran Into
🔥 Major Technical Hurdles
- Real-Time Typing Speed Tracking Without Killing Battery
The Problem:
Initially tried monitoring every single keystroke system-wide to calculate typing speed and error rates. This absolutely destroyed battery life—phone would drain 40% faster. Users would uninstall immediately.
The Solution:
Switched to sampling-based approach: capture typing metrics every 30 seconds instead of every keystroke
Used Android's AccessibilityService more efficiently with debouncing
Implemented smart pause detection—stop tracking when phone is idle
Result: Battery impact reduced from 40% to just 8-12%
- App Usage Categorization Was a Nightmare
The Problem:
How do you know if YouTube is "productive" or "distracting"? A student watching physics lectures vs. cat videos—same app, totally different context. Simple app blocking would break legitimate study.
The Solution:
Built a context-aware categorization system:
Users manually categorize apps per goal (YouTube = productive for "Video Editing Goal", distracting for "Math Study Goal")
Time-of-day intelligence: Instagram during scheduled breaks = OK, during focus sessions = distraction
Machine learning model trained on patterns: if user switches apps every 2 mins = distraction, 20+ mins = likely productive
Added manual override: "This WAS productive" button for edge cases
- Fatigue Calculation: Way Harder Than Expected
The Problem:
Initial algorithm was just total_hours_today / 24 * 100. Completely useless. It didn't account for:
Break quality (15-min phone scroll ≠15-min walk)
Task difficulty (calculus ≠reading notes)
Individual differences (some people can focus 10 hours, others max at 6)
The Solution:
Multi-factor fatigue model:
Fatigue Score = weighted_average(
- Continuous focus time (longer = higher fatigue)
- Typing error rate (errors spike when tired)
- App switching frequency (increases with fatigue)
- Break deficit (hours since last real break)
- Time of day (natural circadian rhythm)
- Historical baseline (personalized to user)
)
Took 3 weeks of testing with real users to tune the weights correctly.
- Firebase Realtime Sync Was Eating Data
The Problem:
Syncing app usage data every minute to Firebase for leaderboards consumed 500MB+ monthly data. Unacceptable for students with limited data plans.
The Solution:
Implemented smart sync strategy:
Batch updates: collect 15 minutes of data, compress, send once
Sync only on WiFi by default (user preference)
Delta sync: only send changes, not full state
Offline-first architecture with Room database
Data usage dropped to ~50MB/month
- Leaderboard Cheating Was Rampant in Testing
The Problem:
Beta testers gamed the system:
Left study apps open overnight
Used auto-clickers to fake activity
Manually inflated session times
The Solution:
Activity validation algorithms:
Typing activity must be detected (idle apps don't count)
Movement patterns analyzed (humans don't type at perfect intervals)
Max session length caps (8 hours without break = suspicious)
Random integrity checks: "Are you still studying?" popup
Implemented soft penalties: suspicious sessions marked with lower quality scores rather than hard bans (benefit of doubt)
- Accessibility Permissions Scared Users Away
The Problem:
Android's AccessibilityService requires scary permission prompts: "This app can read EVERYTHING on your screen, including passwords."
45% of beta users abandoned signup at this step. Trust issue, not technical issue.
The Solution:
Transparency campaign:
Added explainer video showing exactly what we track (app names, typing speed) and what we DON'T (passwords, messages, browsing history)
Open-sourced the tracking code on GitHub
Added "Privacy Dashboard" showing all collected data
Gave users granular control: "Track typing" toggle, "Track apps" toggle
Abandonment dropped to 18%
- Pomodoro Timer Broke During Phone Sleep
The Problem:
Android Doze mode would kill the timer service. Users would start a 25-min focus session, phone sleeps, timer stops at 12 minutes. Session data corrupted.
The Solution:
Used AlarmManager with setExactAndAllowWhileIdle() for critical timer events
Foreground service with persistent notification (can't be killed)
Added recovery logic: if app reopens mid-session, recalculate time from session start timestamp
Fallback: if timer is off by >2 mins, show dialog asking user to confirm actual focus time
🎓 Key Lessons Learned
Battery life is sacred—users will tolerate slow features but not dead batteries
Permissions need education—be transparent about data usage
Context matters more than raw data—YouTube isn't inherently good or bad
Users will cheat—design for adversarial users from day one
The hardest part wasn't the code—it was understanding human behavior and designing systems that work with it, not against it.
