Local notification instant trigger


#1

How can you trigger a notification instantly?

// Schedule delayed notification
this.localNotifications.schedule({
   text: 'Delayed ILocalNotification',
   at: new Date(new Date().getTime() +1000),
   led: 'FF0000',
   sound: null
});

My workaround is to do it like seen above. But this is dirty and has a one second delay. I can’t find anything in the docs on how to trigger notifications instantly…


#2

if i use above im getting thi error
Unknown property: at

if i use this

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

im getting this error

Argument of type ‘{ text: string; trigger: { at: Date; }; led: string; sound: string; }’ is not assignable
to parameter of type ‘ILocalNotification | ILocalNotification[]’. Object literal may only specify known
properties, and ‘trigger’ does not exist in type ‘ILocalNotification | ILocalNotification[]’.

any solution for this