Hi everyone,
What I’m using is LocalNotifications from @capacitor/core.
So what I did is this:
LocalNotifications.schedule({
notifications: [
{
title: 'Title',
body: 'Body',
id: 1,
schedule: {every: 'hour', on: {minute: 40}},
}
]
});
But it doesn’t work.
Any ideas?
Where are you testing it? In the browser? In Android? In iOS?
jiharz
3
I’m testing on an android emulator (android 9.0)
Looking at the Capacitor source, I suspect it’s expecting the schedule
to contain either every
or on
, but not both.
1 Like
Then how the schedule object should look like ?
I guess just schedule: {on: {minute: 40}}
. The docs could do with some more info.
1 Like
jiharz
7
Yes I tried that, I didn’t get any notif though
That’s how it’s done in this example. And it works for me. At least I get the first notification, I didn’t wait an hour to check the next one.
1 Like