NotifyTime plus NotifyRepeatInterval do not work as expected
Describe the bug
If I setup a notificationRequest with a Schedule.NotifyTime of let's say DateTime.Now.AddSeconds(5) and a Schedule.NotifyRepeatInterval of TimeSpan.FromMinutes(2), I will receive the first notification in 2 Minutes and not in 5 seconds.
To Reproduce
make a request like this:
var nr3 = new NotificationRequest
{
NotificationId = 123,
Title = "Wartung",
Description = "some description",
ReturningData = "test"
CategoryType = NotificationCategoryType.Alarm,
Schedule = {
NotifyTime = DateTime.Now.AddSeconds(5),
RepeatType = NotificationRepeat.TimeInterval,
#if DEBUG
NotifyRepeatInterval = TimeSpan.FromMinutes(2),
#else
NotifyRepeatInterval = TimeSpan.FromDays(1),
#endif
}
};
await LocalNotificationCenter.Current.Show(nr3);
Expected behavior
I expected a first notification at Schedule.NotifyTime (in 5 seconds) and then repeated notifications every 2 minutes.
Platform (please complete the following information):
- OS: iOS 17.2
- Version 2.2.0
Smartphone (please complete the following information):
- Device: iPad (10th gen)
@fhintsch iOS dictates when to show notifications.
Does it work without the repeat time?
@thudugala
My Observation with Nuget 11.1.1, latest Maui - Android Version 14.
With RepeatType = NotificationRepeat.No, NotifyTime = DateTime.Now.AddSeconds(10),
If App is in front, the Local Notification properly shown after 10 ~ 11 Seconds If App is in background, the Local Notification shown after 13 ~ 14 Seconds If App is killed immediately after set, the Local Notification shown after 17 ~ 20 Seconds
No other front Apps are running.
Please check. Thanks
https://github.com/thudugala/Plugin.LocalNotification/wiki/3.-Scheduled-Android-notifications