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

NotifyTime plus NotifyRepeatInterval do not work as expected #476

Open
fhintsch opened this issue Feb 21, 2024 · 3 comments
Open

NotifyTime plus NotifyRepeatInterval do not work as expected #476

fhintsch opened this issue Feb 21, 2024 · 3 comments
Assignees
Labels
Android Android only issue question Further information is requested

Comments

@fhintsch
Copy link

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 fhintsch added the bug Something isn't working label Feb 21, 2024
@thudugala
Copy link
Owner

@fhintsch iOS dictates when to show notifications.

Does it work without the repeat time?

@thudugala thudugala added the iOS iOS only issue label Feb 21, 2024
@VinShen
Copy link

VinShen commented Mar 8, 2024

@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

@thudugala thudugala added question Further information is requested Android Android only issue and removed bug Something isn't working iOS iOS only issue labels Mar 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Android Android only issue question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants