Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

setNotificationOnAppKillContent not work correctly in iOS 15.5 #183

Closed
hiepjozu opened this issue Apr 10, 2024 · 8 comments
Closed

setNotificationOnAppKillContent not work correctly in iOS 15.5 #183

hiepjozu opened this issue Apr 10, 2024 · 8 comments
Assignees
Labels
bug Something isn't working

Comments

@hiepjozu
Copy link

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

@hiepjozu hiepjozu added the bug Something isn't working label Apr 10, 2024
@gdelataillade
Copy link
Owner

Hi @hiepjozu

Could you be more specific please ? I'm not sure to understand your issue.

Make sure to:

  • call Alarm.setNotificationOnAppKillContent before the Alarm.set
  • if you have multiple alarms then use different ids

@hiepjozu
Copy link
Author

Thanks @gdelataillade . Must I call Alarm.setNotificationOnAppKillContent every Alarm.set or one time when init alarm?

@gdelataillade
Copy link
Owner

Thanks @gdelataillade . Must I call Alarm.setNotificationOnAppKillContent every Alarm.set or one time when init alarm?

Just one time after running await Alarm.init.

@hiepjozu
Copy link
Author

hiepjozu commented Apr 11, 2024

Thanks @gdelataillade . Must I call Alarm.setNotificationOnAppKillContent every Alarm.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?

@gdelataillade
Copy link
Owner

gdelataillade commented Apr 12, 2024

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.

@younesouhbi
Copy link

@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?

@gdelataillade
Copy link
Owner

@younesouhbi

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.

@gdelataillade
Copy link
Owner

I'm closing this issue because the OnKillNotification issue is resolved. Please refer to #164 issue and #165 PR for the time zone change management.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants