A gamified focus timer app for Android. Complete focus sessions to build and grow a village of igloos — stay on task and your civilization thrives; abandon a session and your igloo crumbles.
- Focus Timer — circular drag-to-set timer (1–720 minutes), with a manual entry option
- App Blocker — uses Android Accessibility Service to block distracting apps during sessions
- Village Simulation — each completed session places an igloo in your village; longer sessions unlock larger igloo types
- Multiple Villages — fill a village with 25 igloos to unlock the next one
- Store — spend coins earned from focus sessions to unlock new igloo styles (castle, pyramid, spaceship, and more)
- Stats — weekly bar chart, trend vs. last week, deep session count, and goal completion rate
- Social / Friends — add friends by email, view their villages via Firebase
| Layer | Technology |
|---|---|
| Language | Kotlin |
| Min SDK | 28 (Android 9) |
| UI | Views + ViewBinding |
| Backend | Firebase Auth, Firestore |
| Background | Foreground Service (timer), Accessibility Service (app blocking) |
| Auth | Google Sign-In |
app/
└── src/main/java/com/igloo/focusapp/
├── data/
│ ├── SessionManager.kt # SharedPreferences state (coins, villages, sessions)
│ ├── FirebaseManager.kt # Firestore sync & friend management
│ ├── IglooStyle.kt # Igloo catalog definitions
│ └── AppInfo.kt # App metadata model
├── ui/
│ ├── MainActivity.kt # Tab host (Timer / Village / Store / Stats / Friends)
│ ├── FocusSessionActivity.kt # Active session countdown screen
│ ├── VillageView.kt # Custom canvas view rendering the igloo grid
│ ├── CircularTimerView.kt # Drag-to-set circular timer
│ ├── WeeklyBarChartView.kt # Stats bar chart
│ ├── SettingsActivity.kt # Google Sign-In + blocked app management
│ ├── AppSelectActivity.kt # Pick apps to block
│ ├── BlockingOverlayActivity.kt # Shown when a blocked app is opened
│ └── FriendVillageActivity.kt # Read-only view of a friend's village
├── adapter/
│ ├── AppListAdapter.kt
│ ├── FriendsAdapter.kt
│ └── StoreAdapter.kt
└── service/
├── TimerService.kt # Foreground timer with notification
└── AppBlockerService.kt # Accessibility service for app blocking
- Android Studio Hedgehog or newer
- Android SDK 34
- A Firebase project with Authentication (Google provider) and Firestore enabled
-
Clone the repository:
git clone https://github.com/YOUR_USERNAME/ProjectIgloo.git cd ProjectIgloo -
Add your
google-services.jsontoapp/(download from the Firebase console). -
Open the project in Android Studio and let Gradle sync.
-
Run on a physical device or emulator (API 28+).
| Permission | Purpose |
|---|---|
| Accessibility Service | Detect and block selected apps during a session |
| Display over other apps | Show the blocking overlay on top of blocked apps |
| Foreground Service | Keep the countdown timer running in the background |
| Internet | Firebase sync and social features |
Both the Accessibility and overlay permissions must be granted manually by the user — the app walks them through the settings screens on first use.
| Session Length | Igloo Type |
|---|---|
| < 20 min | Small pod |
| 20–34 min | Medium igloo |
| 35–49 min | Large glacier palace |
| 50+ min | Epic summit lodge |
MIT