Well, my problem is the next one:
I’m implementing this useful plugin because i need alerts for an schedule on the work place of my clients.
They need alerts for the entry (08:00 am) and the exit (03:00 PM). So i did this schedule from Monday to Friday.
Like this:
{
title: “Portal del empleado”,
body: “Recuerde registrar su jornada en el sistema de fichaje”,
id: randomID,
schedule: {
every: “week”,
on: {
hour: hour,
minute: minute,
weekday: valorDia
},
allowWhileIdle: true
}
};
being ‘randomID’ a random generated ID for the Id notifications,
‘hour’ = 8 and ‘minute’ = 0, ‘valorDia’ will be the day of the week to schedule this notifications.
If we add the objects properly with the params that we want to schedule, we should have 10 notifications on the LocalNotificationSchema List on the options (ScheduleOptions) that we want to add on the LocalNotifications.schedule method.
This is going fine and working properly, but if i want to delete and destroy this schedule on the phone, using cancel method is NOT working. i’m passing correctly the Id that is needed to work, on the CancelOptions object, property notifications —> { id: number }. But this is a void return and is not possible to know if this method deleted correctly the schedule.
I’ll tell to you what it did: nothing. Notifications are still coming and activated at this point.
i also tried to use var pendings = await LocalNotifications.getPending(); to get the pending notifications, but it’s like there is not pending notifications…
could anyone explain to me what is going on here?