I switched my application FCM to this package from an old one.
The case:
I would like to navigate my user inside my application pages, when the push notification is tapped. For example if the user get a new notification about a new task, when the user click on the notification the app will navigate the user to the task details page.
I would like to explain some behavior difference between this FCM package and the old Cordova FCM package (cordova-plugin-fcm-with-dependecy-updated):
Some lines from Cordova package readme:
Application is in foreground:
The notification data is received in the JavaScript callback without notification bar message (this is the normal behavior of mobile push notifications).
For Android, to show the notification received on the foreground, it's recommended to use cordova-plugin-local-notification as it provides many presentation and interaction features.
Application is in background or closed:
The device displays the notification message in the device notification bar.
If the user taps the notification, the application comes to foreground and the notification data is received in the JavaScript callback.
If the user does not tap the notification but opens the application, nothing happens until the notification is tapped.
The important parts in the foreground behavior, when the app get a new notification while it is in foreground: it does nothing. In the Capacitor-C FCM package, the subscription run the code in foreground too, immediately without click on the push notification.
The difference in the background case also similar "If the user does not tap the notification but opens the application, nothing happens until the notification is tapped.", so if the user get notification, but doesn't tap on it, in my case the app should not be redirect to a different page.
Feature request:
It would be nice if the payload get a new parameter like the "coldstart" and "foreground" parameters, for example "tapped", this will be a boolean, and it will be true, if the notification is tapped and will be false when the subscription handler called automatically by FCM.
Hi,
I switched my application FCM to this package from an old one. The case:
I would like to explain some behavior difference between this FCM package and the old Cordova FCM package (cordova-plugin-fcm-with-dependecy-updated): Some lines from Cordova package readme:
The important parts in the foreground behavior, when the app get a new notification while it is in foreground: it does nothing. In the Capacitor-C FCM package, the subscription run the code in foreground too, immediately without click on the push notification. The difference in the background case also similar "If the user does not tap the notification but opens the application, nothing happens until the notification is tapped.", so if the user get notification, but doesn't tap on it, in my case the app should not be redirect to a different page.
Feature request: It would be nice if the payload get a new parameter like the "coldstart" and "foreground" parameters, for example "tapped", this will be a boolean, and it will be true, if the notification is tapped and will be false when the subscription handler called automatically by FCM.