I am using Angular Firebase for push notifications. Everything is working fine with foreground messages but when i added a 'setBackgroundMessageHandler' call in firebasw-messaging-sw.js file to handle background message its getting triggered but I am not sure how to send the notification in app from there or to convert it foreground.
messaging.setBackgroundMessageHandler(function (payload) {
console.log('[firebase-messaging-sw.js] Received background message ', payload);
var data = payload.data;
});
Can someone help me with this?
I am using Angular 9.