I want to push notification to desktop and mobile. For that I following this article: https://developers.google.com/web/updates/2015/03/push-notifications-on-the-open-web?hl=en
I have two question:
socket.io
for example io.on('message')
instead of GCM
?Two questions, Two answers:
Can I use push notification to send notification after all tabs are closed (Chrome restart?)
Yes. The notification can be sent for Desktop Chrome, and Android Chrome, after chrome is closed. using Notification API.
Can I trigger the notification by using socket.io for example io.on('message') instead of GCM?
No. The service worker is not working in the background, while the browser / tabs are closed. The only way to wake up the service worker is by using GCM.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With