1

I was following this guide to setup Web Push notifications in our web app: https://blog.elmah.io/how-to-send-push-notifications-to-a-browser-in-asp-net-core/

But unrelated to ASP.NET core, I would like to know if it is possible if these push notifications can be received across multiple devices, since I cannot seem to get this working (yet) during my first tests.

Let's say:

  1. A user logs in into browser, for example Chrome (with same user, both mobile and desktop)
  2. Registers for web push notifications on our app (on desktop)
  3. we send a notification to the registered user

--> Can push notifications both be received on mobile AND desktop?
--> Is that registration linked to a device, or linked to the logged in user from browser? (or other?)

RubenHerman
  • 1,674
  • 6
  • 23
  • 42

1 Answers1

0

Currently I don't think it's possible to do this. (if someone would be able to show me otherwise, I'll update this)

The reason is because that when you subscribe for web push notifications, a serviceworker (= in background running javascript file) needs to be installed on your device to receive the notifications.
If you allow notifications on desktop (for example), this doesn't mean the serviceworker will be installed on mobile.

RubenHerman
  • 1,674
  • 6
  • 23
  • 42