You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to make a itinerary with a list of events (12 or more), all in the same day but with different hour. I want to add a Reminder Button, and when the user tap in it, create a Notification that will be sent 10 minutes before the every event hour that user choose. I the same way, if the user tap again in the same event, cancel the previous notification. My function code is:
Basically, first I get the ID of the event selected, second I use cordovaLocalNotification.isScheduled() to determine if the Notification for that event is already scheduled, in base on that id. If that function return me true, I cancel the event. If return me false, I create the new alert, with the id. Every event has different Id, different hour and differente message.
So, the first time I tap in the reminder, it works fine. When is only one, the notification is created, and is sent in the correct. But, if I tap the first event, and after tap a second one, here occurs something weird. cordovaLocalNotification.isScheduled() return true, in other words, that the notification is already scheduled, and the code cancel it, but what it does, in fact, is cancel the first one.
The two events have different ID, but it's look like anyway the application take every notification as the same. What I am doing wrong? What is the correct form of add two or more notifications?
Thanks.
The text was updated successfully, but these errors were encountered:
Hi.
I am trying to make a itinerary with a list of events (12 or more), all in the same day but with different hour. I want to add a Reminder Button, and when the user tap in it, create a Notification that will be sent 10 minutes before the every event hour that user choose. I the same way, if the user tap again in the same event, cancel the previous notification. My function code is:
Basically, first I get the ID of the event selected, second I use cordovaLocalNotification.isScheduled() to determine if the Notification for that event is already scheduled, in base on that id. If that function return me true, I cancel the event. If return me false, I create the new alert, with the id. Every event has different Id, different hour and differente message.
So, the first time I tap in the reminder, it works fine. When is only one, the notification is created, and is sent in the correct. But, if I tap the first event, and after tap a second one, here occurs something weird. cordovaLocalNotification.isScheduled() return true, in other words, that the notification is already scheduled, and the code cancel it, but what it does, in fact, is cancel the first one.
The two events have different ID, but it's look like anyway the application take every notification as the same. What I am doing wrong? What is the correct form of add two or more notifications?
Thanks.
The text was updated successfully, but these errors were encountered: