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

Failed Change Title and Body on Notification (Alarm version 3.0.14) #191

Closed steveng15 closed 2 months ago

steveng15 commented 7 months ago

Alarm plugin version 3.0.14

Describe the bug I want to change the title and body that comes out when the notification appears. I have used Alarm.setNotificationOnAppKillConrent and that didn't work. I placed Alarm.init in the main.dart file, this is main.dart code:

main

Where do I put Alarm.setNotificationOnAppKillContent? Is it when the alarm goes off which is on ring.dart

ring

I try use static data for Alarm.setNotificationOnAppKillContent and it's not work.

Expected behavior Title and body can be changed according to my expectation. In addition, the flutter icon logo can be removed.

Screenshots WhatsApp Image 2024-04-26 at 10 23 58

gdelataillade commented 6 months ago

Hi @steveng15

The Alarm.setNotificationOnAppKillContent is for the specific notification that shows when the app gets killed; if you enabled enableNotificationOnKill parameter (enabled by default). It should be called just after Alarm.init.

For the notification that shows when alarms rings, you have to set the notificationTitle and notificationBody parameters.

About the Flutter notification icon, I'll take a look at it but how did you setup your app icons ?