setNotificationOnAppKillContent not work correctly in iOS 15.5
Closed this issue · 8 comments
Alarm plugin version: 3.0.14
Describe the bug:
I set multi alarm on project with this setting.
final alarmSettings = AlarmSettings(
id: id,
dateTime: time,
assetAudioPath: AlarmServiceConst.ringtons,
notificationTitle: Platform.isAndroid ? ValidateUtils.l10n.appName : '',
notificationBody: Platform.isAndroid ? ValidateUtils.l10n.notificationImportantContent : '',
androidFullScreenIntent: false,
);
and I config await Alarm.setNotificationOnAppKillContent(title, content) but it show one time on iOS 15.5
Device info
Iphone 7 iOS 15.5
Hi @hiepjozu
Could you be more specific please ? I'm not sure to understand your issue.
Make sure to:
- call
Alarm.setNotificationOnAppKillContent
before theAlarm.set
- if you have multiple alarms then use different
id
s
Thanks @gdelataillade . Must I call Alarm.setNotificationOnAppKillContent
every Alarm.set
or one time when init alarm?
Thanks @gdelataillade . Must I call
Alarm.setNotificationOnAppKillContent
everyAlarm.set
or one time when init alarm?
Just one time after running await Alarm.init
.
Thanks @gdelataillade . Must I call
Alarm.setNotificationOnAppKillContent
everyAlarm.set
or one time when init alarm?Just one time after running
await Alarm.init
.
So if I set multiple alarm. Is it NotificationOnAppKill will await when set alarm completed and NotificationOnAppKill will work right? And it show one time or every time when user kill app?
Yes. I recommend to call Alarm.setNotificationOnAppKillContent
once, in the main
function, just after the await Alarm.init
. It will work every time user kill the app.
Let me know if you have any other question and if we can close the issue.
@gdelataillade How would you recommend handling a situation where the user can switch the locale of the app mid-session? The OnKillNotification will fire with the startup locale instead of the current. Is there a way to reset it later?
The on-kill-notification is shown at the moment the app gets terminated, it is not scheduled.
About the time zone change, I'm currently working on it here #165. It might take a while though.