How to send a notification at a specified time every day in last version Local Notifications?


#1

How to send a notification at a specified time every day in last version Local Notifications?

This is work:

this.localNotifications.schedule({
   text: 'Delayed ILocalNotification',
   trigger: {at: new Date(new Date().getTime() + 3600)},
   led: 'FF0000',
   sound: null
});

I’m interested every day at a certain time, but even an example from the documentation

trigger: { every: { month: 10, day: 27, hour: 9, minute: 0 } }

leads to error (with build --prod):

Argument of type ‘{ id: number; text: string; trigger: { every: { month: number; day: number; hour: number;
minute:…’ is not assignable to parameter of type ‘ILocalNotification | ILocalNotification[]’. Type ‘{ id:
number; text: string; trigger: { every: { month: number; day: number; hour: number; minute:…’ is not
assignable to type ‘ILocalNotification[]’. Property ‘length’ is missing in type ‘{ id: number; text: string;
trigger: { every: { month: number; day: number; hour: number; minute:…’.

Thankful in advance for the help.


#2

Hello,

did you find any solution on this?