How to schedule LocalNotification every day at HH:mm with Capacitor

Hi ion-people! :orangutan:

I can’t configure the schedule at a certain time every day.

Using at works but I can’t find documentation on using on, count, repeat and every.

How are they used?

So this works (After 3 seconds) :+1:

const notifications = [
{
        title: 'Title',
        body: 'Message',
        smallIcon: 'res://calendar',
        id: index,
        schedule: { at: new Date(new Date().getTime() + 3000) },
        actionTypeId: 'ActionId',
      }
]
const notifs = await LocalNotifications.schedule({notifications});

But nothing to do for this (every day at 4.30pm), with or without count & repeat :face_with_symbols_over_mouth: :face_with_symbols_over_mouth:

const notifications = [
{
        title: 'Title',
        body: 'Message',
        smallIcon: 'res://calendar',
        id: index,
        schedule: { every: 'day', on: {hour: 16, minute: 30}, repeats: true, count: 10 },
        actionTypeId: 'ActionId',
      }
]
const notifs = await LocalNotifications.schedule({notifications});

I tried {every: ‘minute’ | ‘second’ | ‘hour’} but it schedule randoms notifications!

Should be a trivial alarm function!

Any tips?
Please Help!!

2 Likes

Did you ever find a solution to this?

1 Like

Capacitor local notifications are broken and the documentation is wrong.

I’ve done this with Cordova for now and written it up here:

1 Like

I found a workaround not a solution…

Hello everyone!

I am having a similar issue here. Is there word on how to make a daily recurring notification on Android?

Thank you

1 Like

Same issue for me…fixed scheduling just doesnt work.
Is this ever going to work?

Can you share your workaround?