Local notifications not trigger or click when app is closed or killed
See original GitHub issueYour Environment
- Plugin version:
- Platform: ios
- OS version:13.0
- Device manufacturer / model: Apple
- Cordova version :9.0.0
- Cordova platform version : ios 5.0.1, android 8.1.0
- Ionic Version :5.4.1
Expected Behavior
Local notifications trigger or click when app is closed or killed
Actual Behavior
Local notifications showed but it’s not trigger or click when app is closed or killed, it just work only app open or run background
Context
(<any>window).skipLocalNotificationReady = true;
this.platform.ready().then(() => {
this.backgroundMode.enable();
this.localNotifications.on('click').subscribe(res => {
alert("click notification")
});
this.localNotifications.on('trigger').subscribe(res => {
alert("trigger notification")
});
this.localNotifications.fireQueuedEvents();
})
Issue Analytics
- State:
- Created 4 years ago
- Reactions:2
- Comments:14 (1 by maintainers)
Top Results From Across the Web
cordova-plugin-local-notifications click event after app is killed
To make sure, the event listener will fire, you have to place it inside deviceready e.g.: document.addEventListener('deviceready' ...
Read more >Notifications - Expo Documentation
Notifications. The expo-notifications provides an API to fetch push notification tokens and to present, schedule, receive and respond to notifications.
Read more >awesome_notifications | Flutter Package - Pub.dev
Create Local Notifications on Android, iOS and Web using Flutter. Send Push Notifications using add-on plugins, as awesome_notifications_fcm; Add images, sounds ...
Read more >Notifications Not Shown - Mobile Push
"Delivered" notifications in OneSignal means we have successfully sent the notification to the push servers (FCM/APNS/WNS etc..). These push servers then ...
Read more >Will iOS awake my app when i receive silent push notification ...
Hey awesome people, I'm doing emergency location based app and my flow is : 1) User install app. 2) Upload device details to...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@Guy-Sela I tested on iOS. But to answer simply your question: Yes
the trigger event
(the click will if correctly setup) will NOT fire afterwards by launching or anything - only if you had the app in foreground.At least in my test application where I thought I could depend on this. I could not. Also wrote in my answer how you could do this yourself. For me I had to schedule notifications for 3 days and also needed to have 2 queues. The ones which are to be fired and the ones which should be fired. There is a limit of 64 local notifications which can be scheduled.
@vvsatpute read my post about this / how to use this: https://github.com/katzer/cordova-plugin-local-notifications/issues/1798#issuecomment-656962391