Closed
Description
Apart from initial notification handling like
messaging.setBackgroundMessageHandler(function(payload)
how do I add the listener when user clicks on it? I know if I set the "click_action" it will handle it automatically. But I have to do something extra like tracking when user clicks on it and then launch the click_action.
I know with web push, we can do it via
self.addEventListener('notificationclick', function(event) {
but what is equivalent in FCM SDK? or the self.addEventListener('notificationclick', function(event) { will work with FCM SDK also?
also how do I listen to dismiss/close event like with below when using without FCM SDK?
self.addEventListener('notificationclose', function(event) {
Metadata
Metadata
Assignees
Labels
No labels