How do I use service workers to receive Pusher Channels messages?

You can use pusher-js in a Service Worker and you can use the Notification API to display messages. This blog post uses pusher-js in a Service Worker and there is a GitHub repo linked. However, it isn't possible to receive messages using Pusher while the web worker isn't running (e.g. no app tabs open). To do that, you would probably need to make use of the Push API.

Was this article helpful?
0 out of 0 found this helpful
Haven't found what you were looking for?
Submit a ticket