Closed SalvoLunar closed 3 years ago
Hi,
Is it possible to configure this plugin to listen for messages in the background as explained here https://firebase.google.com/docs/cloud-messaging/js/receive?
messaging.onBackgroundMessage(function(payload) { console.log('[firebase-messaging-sw.js] Received background message ', payload); // Customize notification here const notificationTitle = 'Background Message Title'; const notificationOptions = { body: 'Background Message body.', icon: '/firebase-logo.png' }; self.registration.showNotification(notificationTitle, notificationOptions); });
Hi @SalvoLunar Sure, check out the documentation at https://firebase.nuxtjs.org/service-options/messaging . You can use createServiceWorker to automatically create the service worker for you.
Hi,
Is it possible to configure this plugin to listen for messages in the background as explained here https://firebase.google.com/docs/cloud-messaging/js/receive?