FocusBlocker is a minimalist Android application designed to help you regain focus by blocking distracting notifications from specific apps. Unlike standard Do Not Disturb modes, FocusBlocker allows you to target specific apps (like WhatsApp, Instagram, Slack) while keeping important notifications active.
- Selective Blocking: Add specific package names (e.g.,
com.whatsapp,com.instagram) to a block list. - Resume & Restore: When you turn off "Block Mode", the app automatically restores the notifications you missed, so you never lose important messages.
- Quick Settings Tile: Toggle Focus Mode on/off instantly from your phone's notification shade/control center.
- Persistent Storage: Your block list is saved automatically.
- Background Service: Runs efficiently in the background using Android's native
NotificationListenerService. - Privacy First: No internet permission required (except for Gradle build). All data stays on your device.
- Language: Kotlin
- Minimum SDK: API 24 (Android 7.0)
- Target SDK: API 34 (Android 14)
- Architecture: MVVM-lite (Service-based)
- Key Components:
NotificationListenerService: To intercept and cancel notifications.TileService: To provide the Quick Settings toggle.SharedPreferences: For persisting the block list.
- Download the APK: Go to the Releases page and download the latest
.apk. - Install: Open the file on your Android device. You may need to allow installation from unknown sources.
- Grant Permissions:
- Open the app and click "1. Grant Permission".
- Find FocusBlocker in the list and toggle it ON.
- (Android 13+) Allow the app to send notifications (required for the Restore feature).
- Clone the repository:
git clone [https://github.com/YourUsername/FocusBlocker.git](https://github.com/YourUsername/FocusBlocker.git)
- Open the project in Android Studio.
- Sync Gradle files.
- Connect your device or use an Emulator.
- Click Run (Green Play Button).
- Add Apps: Type the package name of the app you want to block (e.g.,
com.instagram.android) and click Add.- Tip: You can find package names by sharing an app from the Play Store to a browser and looking at the URL
id=...parameter.
- Tip: You can find package names by sharing an app from the Play Store to a browser and looking at the URL
- Start Blocking: Toggle the switch to ON or tap the Quick Settings tile.
- Stop Blocking: Toggle the switch to OFF. All blocked notifications will reappear in your status bar marked as "(Missed)".
Contributions are welcome! Please fork the repository and create a pull request.