Plugin.LocalNotification
Plugin.LocalNotification copied to clipboard
Current_NotificationReceived fires twice when two NotificationRequests are active at the same time
Describe the bug Current_NotificationReceived fires twice when two NotificationRequests are active at the same time. When there are two reminders with two different NotificationId, active at the same time with same interval but started at different time. I get Current_NotificationReceived event twice for a given NotificationId.
To Reproduce Steps to reproduce the behavior:
- Create first NotificationRequest
- Wait for sometime
- Create second NotificationRequest
- At first reminder, See error
Expected behavior Expect Current_NotificationReceived once for each NotificationId.
Screenshots If applicable, add screenshots to help explain your problem.
Platform (please complete the following information):
- OS: Android 10, Windows 10 and Visual Studio 2022
- Version [e.g. 22]
Smartphone (please complete the following information):
- Moto g7
- OS: Android
- Version 10
Additional context Snap of my code var NotifySchedule = new NotificationRequestSchedule { NotifyTime = DateTime.Now.AddSeconds(30), RepeatType = NotificationRepeat.TimeInterval, NotifyRepeatInterval = TimeSpan.FromSeconds(20), };
var NotifyMe = new NotificationRequest
{
NotificationId = NoticeID,
Subtitle = SubTitle,
Title = Title,
Description = Description,
BadgeNumber = 1,
//Repeats = NotificationRepeat.Daily,
//NotifyTime = (DateTime.Today + ToDoNagMeTimeDv),
Schedule = NotifySchedule,
ReturningData = "Notification Tapped",
CategoryType = NotificationCategoryType.Reminder,
Android =
{
//VisibilityType = AndroidVisibilityType.Private,
ChannelId = "MainChannel",
IconSmallName =
{
ResourceName = "iconpill",
},
Color =
{
Argb = System.Drawing.Color.Red.ToArgb(),
},
//Priority = AndroidNotificationPriority.Default,
},
};
NotificationCenter.Current.Show(NotifyMe);
NotificationMessageDv = NotifySchedule.NotifyTime.ToString();
NotificationCenter.Current.NotificationTapped += Current_NotificationTapped;
NotificationCenter.Current.NotificationReceived += Current_NotificationReceived;
@andy-shindey Can you please attach a sample project?
Sure, give me a couple of days to recreate the sample as close as possible to my project structure.