I’m trying to schedule a local notfication and repeate it one year later.
The problem is it is not working with at: Date and repeats: true
let date = new Date(Date.now() + 1000 * 10)
LocalNotifications.schedule({
notifications: [
{
title: 'Title',
body: 'Body',
id: 99,
schedule: {
at: date,
repeats: true
},
sound: null,
attachments: null,
actionTypeId: '',
extra: null,
},
],
});
}
You might want to check out this discussion - Local Notifications plugin Capacitor 3
If i use the “on” Attribute the time ago Label is wrong.
As you can See 30.T but If should be now or x Minutes.
The time from the notifcation is when it was created and Not executed
Yeah, I can confirm that. I am also using on
and have noticed this but haven’t had a chance to dig into it. It must be an issue with the plugin.
I opend a issue on github and the answer was use a date without a year but it is not possible do create a date without a year.
The bug is now closed what is in my opinion not fixed!
github bug report
if you use the on attribute in the notification you will get the time difference between when the schedule was created and the time now.
It should be the time difference between executed and now