Wenlan
Wenlan is a source-backed AI knowledge base and LLM wiki for AI work: organize documents and decisions into pages you can find, inspect, and review.
翻訳待ち
Digital Habits: Blocker (previously "ReDD Blocker") is a tool for blocking distracting and addictive apps and websites to focus on what matters. Open source, privacy-first, and easy to use.
翻訳待ち
生産性Kotlin · PythonGitHub @digitalhabitsオンライン所有者未確認
Have you tried it? One tap is enough. No sign-in needed.
No updates detected yet. GitHub releases will appear here.
Digital Habits: Blocker Android
翻訳待ち
Loading the full README. The saved excerpt is shown below.
Block distracting websites and apps with scheduled or one-off blocks. Stay focused on what matters.
Built by computer scientists at the University of Oxford (Dr Ulrik Lyngs) and the University of Maastricht (Dr Konrad Kollnig), as part of the Reduce Digital Distraction project (digitalhabits.org).Read the full README ↗Block distracting websites and apps with scheduled or one-off blocks. Stay focused on what matters.
Built by computer scientists at the University of Oxford (Dr Ulrik Lyngs) and the University of Maastricht (Dr Konrad Kollnig), as part of the Reduce Digital Distraction project (digitalhabits.org).
flowchart TB
subgraph App["Android App (Kotlin / Jetpack Compose)"]
UI[User Interface]
Data[Room Database + DataStore]
Scheduler[Schedule Manager]
end
subgraph Service["Accessibility Service"]
AppWatcher[App Watcher]
WebWatcher[Browser URL Watcher]
end
subgraph Receiver["Broadcast Receivers"]
Boot[Boot Receiver]
Alarm[Alarm Receiver]
end
subgraph System["Android System"]
Apps[Running Apps]
Browsers[Browser URL Bar]
Home[Home Screen]
end
UI --> Data
UI --> Scheduler
Scheduler --> Alarm
Boot --> Scheduler
Alarm --> Service
AppWatcher -->|detect blocked app| Apps
AppWatcher -->|redirect to| Home
WebWatcher -->|detect blocked URL| Browsers
WebWatcher -->|redirect to digitalhabits.org| Browsers
Digital Habits: Blocker uses Android's Accessibility Service to monitor which app is in the foreground. When a blocked app is detected, the user is immediately returned to the home screen.
| Component | Role |
|---|---|
| Accessibility Service | Detects foreground app changes via onAccessibilityEvent |
| Home redirect | Launches the default launcher intent to return user to home screen |
The Accessibility Service also monitors the URL bar of supported browsers. When a blocked domain is detected, the browser is redirected to digitalhabits.org.
| Browser | Support |
|---|---|
| Firefox | ✅ URL bar monitoring via Accessibility |
| Chrome | ✅ URL bar monitoring via Accessibility |
| Brave | ✅ URL bar monitoring via Accessibility |
| Vanadium | ✅ URL bar monitoring via Accessibility |
| Other Chromium-based | ✅ URL bar monitoring via Accessibility |
Schedules define which apps and websites are blocked and when. Each schedule can be configured with:
Schedules are persisted via Room database and survive app restarts. A boot receiver re-registers alarms on device restart.
| Permission | Purpose |
|---|---|
| Accessibility Service | Required. Detects app launches and browser URL navigation |
| Notifications | Shows alerts when content is blocked |
| Battery Optimization Exemption | Ensures reliable background operation |
| Receive Boot Completed | Restores schedules after device restart |
ReDDBlockAndroid/
├── app/src/main/
│ ├── AndroidManifest.xml # App manifest & permissions
│ └── java/net/kollnig/reddblockandroid/
│ ├── MainActivity.kt # Main entry point
│ ├── ReDDBlockApp.kt # Application class
│ ├── data/ # Room database & data models
│ ├── receiver/ # Boot & alarm broadcast receivers
│ ├── schedule/ # Schedule management logic
│ ├── service/ # Accessibility service
│ ├── ui/ # Jetpack Compose UI screens
│ └── util/ # Utility functions
├── build.gradle # Project-level build config
├── app/build.gradle # App-level build config & dependencies
├── gradle/ # Gradle wrapper
└── settings.gradle # Project settings
# Clone the repository
git clone <repo-url>
cd ReDDBlockAndroid
# Build debug APK
./gradlew assembleDebug
# Install on connected device
./gradlew installDebug
Or open the project in Android Studio and run directly on a connected device or emulator.
# Debug build
./gradlew assembleDebug
# Release build
./gradlew assembleRelease
This project is based on Reef by Pranav Purwar, licensed under the MIT License.
MIT
Made with ♥ by digitalhabits.org