a32b9ca212072efe7c16d4bdc23c27b4ebd5f592
Notification Monitor
An Android app that lets you select installed apps and monitors all notifications they receive — displayed in a live, scrollable log.
Features
- App Selector — browse all launchable apps on the device, search by name or package, and toggle monitoring per app (persisted across restarts)
- Live notification log — new notifications appear instantly at the top of the list, showing app name, title, body, and timestamp
- Persistent history — up to 200 entries are stored on-device and survive app restarts
- Permission banner — automatically detects if notification access has not been granted and prompts the user
- Clear log — one-tap menu option to wipe the history
- Boot-safe —
BootReceiverensures the service is re-bound by Android after device reboot
How to Build
Requirements
- Android Studio Hedgehog (2023.1.1) or later
- Android SDK 34
- Minimum device/emulator API 26 (Android 8.0)
Steps
- Open the project in Android Studio (
File → Open→ select theNotificationMonitorfolder). - Let Gradle sync finish.
- Run on a physical device or emulator (
Run → Run 'app').
First-Time Setup on Device
Because NotificationListenerService is a privileged API, Android requires the user to manually grant access:
- Launch the app — a dialog will appear immediately.
- Tap Go to Settings.
- Find Notification Monitor in the list and toggle it ON.
- Confirm the system prompt.
- Return to the app — the yellow warning banner disappears and monitoring is active.
Alternatively, reach this screen any time via the ⋮ menu → Notification Access Settings.
Project Structure
app/src/main/
├── AndroidManifest.xml
├── java/com/notificationmonitor/
│ ├── data/
│ │ ├── AppInfo.java — app metadata model
│ │ ├── NotificationEntry.java — captured notification model
│ │ └── PreferencesManager.java — SharedPreferences persistence
│ ├── service/
│ │ ├── NotificationMonitorService.java — core NotificationListenerService
│ │ └── BootReceiver.java — re-init after reboot
│ └── ui/
│ ├── MainActivity.java — notification log screen
│ ├── NotificationLogAdapter.java
│ ├── AppSelectorActivity.java — app picker screen
│ └── AppSelectorAdapter.java
└── res/
├── layout/
│ ├── activity_main.xml
│ ├── activity_app_selector.xml
│ ├── item_notification.xml
│ └── item_app.xml
├── menu/menu_main.xml
├── values/
│ ├── strings.xml
│ ├── colors.xml
│ └── themes.xml
└── drawable/ic_notification_bell.xml
Key Technical Notes
NotificationListenerServiceis the standard Android API for this use case. It requires theBIND_NOTIFICATION_LISTENER_SERVICEpermission — this cannot be requested at runtime; it must be granted via the special Settings page.- Local broadcasts (
LocalBroadcastManager) are used to push live events from the service to the MainActivity without coupling them. - No third-party notification sniffing — all data comes directly from Android's official API, so this is safe for personal use, but note that publishing an app with this permission to the Play Store requires Google approval.
- The log is capped at 200 entries in
PreferencesManagerto avoid unbounded SharedPreferences growth.
Description
Languages
Java
100%