flutter_notification_listener
1.4.0, released 9 months ago by zoe.im
Flutter plugin to listen for all incoming notifications on Android.
What it does
Allows Android applications to listen to incoming status bar notifications in real-time. It supports running background callbacks, interactive notification actions, and auto-starting after device reboots.
AI-written summary of version 1.4.0, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need to build a notification reader, custom notification log, or automation app on Android.
- You need to handle or reply to incoming notifications from other apps programmatically.
Skip it when
- You need to support platforms other than Android (e.g., iOS).
- You only want to send local or push notifications to your own app.
Strengths
- Supports background execution via static callback functions.
- Provides access to notification fields, icons, actions, and quick replies.
- Supports auto-starting the service after system reboot.
Weaknesses
- Android-only plugin.
- Requires manual setup of Android Manifest permissions and service configuration.
Setup
- Kind
- Plugin (native code)
- Effort
- Medium
- Code generation
- No
- Direct dependencies
- 0
Requires adding the NotificationsHandlerService and specific permissions (WAKE_LOCK, FOREGROUND_SERVICE, POST_NOTIFICATIONS, etc.) to AndroidManifest.xml, plus requesting notification permissions at runtime.
void onData(NotificationEvent event) {
print(event.toString());
}
Future<void> initPlatformState() async {
NotificationsListener.initialize();
NotificationsListener.receivePort.listen((evt) => onData(evt));
}Alternatives
Packages that do the same job and could replace flutter_notification_listener.
- notification_listener_service
Flutter plugin to listen to incoming Android notifications and reply to them.
65Compare - firebase_messaging
Flutter plugin for Firebase Cloud Messaging to deliver messages on Android, iOS, web, and macOS.
99Compare - flutter_local_notifications_linux
Linux implementation of the flutter_local_notifications plugin.
81Compare - flutter_local_notifications
Cross-platform plugin for displaying and scheduling local notifications.
96Compare