notification_listener_service
1.0.0, released 5 months ago by iheb.tech
Flutter plugin to listen to incoming Android notifications and reply to them.
What it does
Allows Flutter applications to listen to incoming and removed notifications on Android via a stream. It also provides capabilities to read notification details (such as title, content, icons) and send direct replies.
AI-written summary of version 1.0.0, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need to read incoming notifications from other apps on Android
- You want to build an automation app that reacts to notifications
- You need to send direct replies to notifications from Flutter
Skip it when
- You only need to send local or push notifications for your own app
- You are targeting iOS (plugin is focused on Android Notification Service)
Strengths
- Provides a stream of incoming and removed notifications
- Supports sending direct replies to notifications
- Exposes rich notification data including icons, images, and content
Weaknesses
- Android-specific platform limitations and configuration required
- Requires manual user permission via system settings
Setup
- Kind
- Plugin (native code)
- Effort
- Medium
- Code generation
- No
- Direct dependencies
- 0
Requires adding a service tag with BIND_NOTIFICATION_LISTENER_SERVICE permission inside the AndroidManifest.xml and requesting runtime permission from the user.
final bool status = await NotificationListenerService.isPermissionGranted();
if (status) {
NotificationListenerService.notificationsStream.listen((event) {
print("Current notification: $event");
});
}Alternatives
Packages that do the same job and could replace notification_listener_service.
- flutter_local_notifications
Pick flutter_local_notifications if you primarily need to display local notifications rather than listening to system-wide notifications from other apps.
96Compare