thudugala / thudugala/Plugin.LocalNotification

NotifyTime plus NotifyRepeatInterval do not work as expected

Open
#476 3 comments 0 reactions 1 assignee View on GitHub

@thudugala is already working on this.

Since Feb 21, 2024.

Android question
Dominant language
C#
Stars
474
Forks
73
PR merge metrics
No merged PRs in 30d

Description

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)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.