cordova-plugin-local-notifications
cordova-plugin-local-notifications copied to clipboard
When the notification is displayed the code in the subscription event 'trigger' & 'click' hasn't been executed on iOS even app running either foreground/background.
Using plugin version: 0.9.0-beta.3
When the notification has been displayed the code in the subscription event 'trigger' & 'click' hasn't been executed on iOS even though the app runs either foreground/background, but the same will works on Android.
Problem facing only on iOS. Could anyone help to resolve this issue?
this.localNotifications.on('click').subscribe((notification)=>{
console.log('login-notification', notification); // **code in the subscription hasn't been executed**
});
this.localNotifications.on('trigger').subscribe((notification)=>{
console.log('login-notification-trigger', notification); // **code in the subscription hasn't been executed**
});
Same work for the event add subscription:
this.localNotifications.on('add').subscribe((notification)=>{
console.log('login-notification-add', notification); // **executed**
});
Hi The events are not working n Android 12 its the same issue l am having for the past week. I have tested the plugin katzer / cordova-plugin-local-notifications it doesnt work on the events onTrigger
onDeviceReady() { this.localNotifications.on('trigger').subscribe((test: any) => { console.log('Trigger' + JSON.stringify(test)); }); }