Dev-hwang / flutter_foreground_task

This plugin is used to implement a foreground service on the Android platform.
https://pub.dev/packages/flutter_foreground_task
MIT License
140 stars 105 forks source link

Disable notification on Android #201

Closed MELICI0US closed 1 month ago

MELICI0US commented 6 months ago

I want to turn off the Android notification when the app is running in the background. I am not sure if this is possible as this package currently stands, but it would be a nice feature if that was an option. If it's something you can already do, please tell me how.

lucasdidur commented 3 months ago

Any update on this?

minhbn00 commented 3 months ago

@lucasdidur there is a way to do it: if your app doesn't have notification permission, there is no notification show but this only happened with Android 13 and higher. I know this is a dumb solution but seems like the dev doesn't want to care about this

maeddin commented 2 months ago

This has nothing to do with this plugin. Foreground services must always have a notification on Android. If you don't want this, you have to use the WorkManager, for example.

https://developer.android.com/develop/background-work/services/foreground-services