gdelataillade/alarm

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

Closed this issue · 1 comments

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

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 ?