Local notifications - NOT WORKING- How to disable or delete scheduled notifications

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?

Please use proper code blocks so we can more easily see your code.

This code should work as you mentioned:

LocalNotifications.cancel({
    notifications: [{ id: reminderId }],
})

Can you give a more complete example? Also, what devices (Android/iOS, physical or emulator) are you having issues on?

Srry, didn’t see the answer… I’ve did a post with more information about my problem on Android. Could you help me with this please?

https://forum.ionicframework.com/t/capacitor-local-notifications-dont-fire-on-android-and-randomly-fire-on-ios/233236/6?u=ortaprogram