How to setup and send push notifications in EasyDNN PWA module
How push notifications work
To be able to send push notifications you need to setup EasyDNN PWA module. After you setup module users will see a popup message where they can choose if they want to receive push notifications.
If user select not to receive notifications a cookie value will be written and user will not be prompted again to receive push notifications. If user select to receive push notifications his token will be saved and when you send notification he will receive it.
Notifications are send using Google Firebase service.
How to connect Google Firebase + EasyDNN PWA module
How to setup EasyDNN PWA module
To setup push notifications in module settings, click on the Edit Mode button and then select Edit PWA Module from the DNN module menu.
Turn on option “Enable push notifications”.
Next option enables you to select platform where user will be asked to receive push notifications.
In this option you set time in seconds after which a popup will appear. The popup will ask user to give permission to receive push notification.
Here you can set if you want notification popup to reappear after certain time.
This option will reset cookie value and notification popup will appear for all users.
In the following fields enter configuration data and keys received from Firebase. How to connect Google Firebase + EasyDNN PWA module
How to send push notifications
To send push notifications click on the Edit Mode button and then select Push notifications from the DNN module menu.
This is how form for entering and sending notifications looks like.
Enter required and optional fields and click “Send push notification”.
Optionally you can also send notifications from Google Firebase console. Go to Firebase and select project you have created. On the left menu select Messaging.
How to connect Google Firebase + EasyDNN PWA module
Now you will have option to send messages. To send messages click on “New campaign” and them “Notifications.
You can now fill in form and send notification to the users from Firebase.
How to connect Google Firebase + EasyDNN PWA module
Browsers and Devices That Support Web Push Notifications
Browsers
Chrome, Firefox, Opera and Safari currently support web push notifications. Notifications vary in appearance between browsers and operating systems.
Devices
Web push notifications work on any computer or laptop running a supported browser, whether PC or Mac. Apple added Safari support for web push in iOS & iPadOS 16.4. To use web notifications on iOS/iPadOS devices, Apple first requires a user to save the website to their home screen as a web app. Android mobile devices do support mobile web push notifications for users running Chrome, Firefox and Opera.