My initial goal is to send push notifications to users on my WordPress website whenever a new post is published, so that users can receive the notification on the homepage. Currently, the bell icon is visible and users are able to subscribe, but notifications are not being delivered.
I also tested sending a notification from the Send Push tab inside the plugin, but the notification is still not received. Once desktop web app notifications are working properly, my next goal is to enable push notifications for my mobile app built in Flutter. For that, I will also need guidance on the Flutter app integration.
Could you please assist me in resolving the current issue with web push notifications and provide guidance on extending this setup to the Flutter mobile app?
In plugin admin settings, under Firebase configuration (first tab)
fill apiKey in first field named “Firebase API key”
fill authDomain in second field
Database url, third field is not needed it is optional
fill projectId in fourth field
fill storage bucket id in fifth field
fill sender id in sixth field
fill app id in 7th field
After saving changes,
If custom prompt is off (first field under options tab) then please go to token tab in admin settings, it will show browser default prompt to subscribe push notification, once notification is allowed then refresh the page, it will show the Firebase subscription token received after you subscribed successfully or
If custom prompt is ON (first field under options tab) then go to front end , it will show custom prompt to subscribe the push notification , once you allow the push notification for your website, go to token tab in admin settings to verify whether you received Firebase subscription token.
Please make sure Firebase api httpv1 option is ON and upload service account json file
((In the Firebase console, open Settings > Service Accounts.Click Generate New Private Key, then confirm by clicking Generate Key.Download the JSON file from Firebase console and upload it in field named “Select service account json file” in Plugin admin settings – Firebase configuration)
If token is received and your site already allowed the push notifications for your website, then notification will be displayed. Please also check console messages (in browser inspect /more tools- developer tools – console in chrome browser) to see whether you are receiving any Firebase related error messages.
I have also attached below screenshot showing service worker tab in browser, please check in your site whether service worker is active and running like shown in below screenshot. At a time only one service worker can be active, if you use any other plugin with service worker then it will create conflict.
I have also tested and below screenshot showing push notifications are working browsers Chrome, Firefox, Safari
Please verify console messages to see whether it shows Firebase related error messages and also verify service worker is active as shown below. Please make sure browser settings to allow push notifications for websites. Even though you allowed push notifications from browser prompt, chrome browser have primary settings for default behaviour (chrome://settings/content/notifications) to block all notifications from all websites , please make sure it is not ON, normally it will not be ON unless user switches on to block all notifications from all sites/apps.
This reply was modified 8 months, 2 weeks ago by Murali.
Apart from posts, is it possible to send push notifications when media files (images, audio, or video) are uploaded to the Media Library? We’ve created REST APIs for our mobile app that display audio and video galleries, so we’d like notifications to be sent whenever an admin uploads new audio or video files from the WordPress backend.
Similarly, if an admin creates a new page or updates an existing one (other than posts), can the plugin send push notifications for those actions as well?
Thanks again for your support!
Viewing 2 replies - 1 through 2 (of 2 total)
The topic ‘not receiving push notification’ is closed to new replies.