gdelataillade / alarm

A Flutter plugin to easily manage alarms on iOS and Android
https://pub.dev/packages/alarm
MIT License
132 stars 86 forks source link

add show notification parameter #274

Closed Jef012 closed 3 weeks ago

Jef012 commented 3 weeks ago

Add show notification parameter Add a 'show notification' parameter, which allows the user to show or hide the notification using a boolean value.

gdelataillade commented 3 weeks ago

Hi @Jef012

Unfortunately, due to Android restrictions on foreground services (required for triggering alarms), each alarm must be associated with a notification.

Jef012 commented 3 weeks ago

Thanks for the clarification. Keeping the notification makes sense given the Android restrictions. However, would it be possible to reduce its priority so that it doesn’t draw too much attention? Also, could we ensure it doesn't navigate to or open the app when triggered?

gdelataillade commented 3 weeks ago

What priority/importance would you like to give to your notification and why ?

You can try it yourself by modifying the code of the plugin (fork it or directly change it in your pub cache). It is set here: https://github.com/gdelataillade/alarm/blob/2cae6cfbe58c8b2fb3ef05fdc3e89444fbc4e04c/android/src/main/kotlin/com/gdelataillade/alarm/services/NotificationService.kt#L68