'Amazon SNS web notification for browser
I want to implement Browser Notifications. Below is my requirement.
When user opens my website than he should receive alert to subscribe to push notifications.
If he chooses to allow it than I want to send him browser push notification whenever I am publishing data on my site.
Is this possible with AMAZON SNS or Any other better approach for this?
Thanks
Solution 1:[1]
Amazon SNS doesn't support browser notification, as an alternative you can use Firebase which support web and mobile notifications
you can find more details here: https://firebase.google.com/docs/cloud-messaging/
Solution 2:[2]
AWS now has a new service AppSync and it can be used to build real time communication - https://aws.amazon.com/appsync/
Solution 3:[3]
I got a task from my supervisor to send notification from AWS SNS using just an API endpoint. The endpoint is written in PHP.
I was able to send notification using that API written in PHP in purely the open-source way.
Web Push Notification using ServiceWorker makes me achieve this.
Here are the steps which I did:
*In that PHP API, I have a Guzzle HTTP Client which calls the NodeJS server to send push notification *After sending push notification in NodeJS back-end, ServiceWorker will listen to that event *ServiceWorker will show notification to my front-end
Solution 4:[4]
can share code example
*In that PHP API, I have a Guzzle HTTP Client which calls the NodeJS server to send push notification *After sending push notification in NodeJS back-end, ServiceWorker will listen to that event *ServiceWorker will show notification to my front-end
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Sofiane Daoud |
| Solution 2 | Nabarun |
| Solution 3 | Felix Labayen |
| Solution 4 | Azmat ali |
