jiusanzhou / flutter_notification_listener

Flutter plugin to listen for and interact with all incoming notifications for Android. 一个监听手机通知的插件。
https://pub.dev/packages/flutter_notification_listener
Other
40 stars 49 forks source link

[Question] Keep the listener active without having to display the listener notification #47

Closed jesselpereira closed 7 months ago

jesselpereira commented 7 months ago

Hey there! Thank you so much for maintaining this much needed and powerful dependency.

I have a question: Can I keep the listener active even with the app closed and without needing to display the listener notification?

It would be a hassle to keep the notification pinned forever.

I appreciate your work, thank you for everything.

Droyder7 commented 7 months ago

You can try starting the listener service with foreground parameter as false to not show any foreground service notification, but this may not guarantee the service will be alive in the background for all the time, as android may kill the services with no active foreground services running for battery saving or other purposes.

But you can try it, it should work in most of the cases.