I am using the plugin “LocalNotification” from Ionic Native. There is a method isTriggered which - I guess - would be the same as .on(“trigger”), but the former does not seem to fire. Any hints?
LocalNotifications.schedule({
id: 1,
title: 'some info',
text: 'more infot',
at: firstNotificationTime
});
LocalNotifications.isTriggered(1).then(triggered => {
console.log("Scheduler fired");
// will not be fired!
});
LocalNotifications.on("trigger", function(notification) {
if (notification.id != 1) return;
console.log("Scheduler 2 fired");
// works fine.
});