Code worked fine before until old cordova-plugin-firebase became deprecated and i had to update everything and install cordova-plugin-firebasex since i couldn't compile app.
I'm able to get token and receive notification but only onNotificationOpen fails...
window.FirebasePlugin.onTokenRefresh(function(token) { // This works
saveToken(token);
}, function(error) {
console.error(error);
});
window.FirebasePlugin.onNotificationOpen(function(data) { //window.FirebasePlugin.onNotificationOpen is not a function
alert('Notification'+JSON.stringify(data));
});
Any suggestion?
onNotificationOpen has been replaced with onMessageReceived.
Please read the documentation,
Thanks, works fine now =)
Most helpful comment
onNotificationOpenhas been replaced withonMessageReceived.Please read the documentation,