D
D
DrFreez2018-07-02 06:57:51
Push technologies
DrFreez, 2018-07-02 06:57:51

How to show push notification for specific user on one client only?

Let's say we send notifications for a specific user. Each user can subscribe to notifications in multiple apps. A spherical example in a vacuum:
1) a web-app in Chrome on a PC (the main browser)
2) a web-app in Firefox on a PC (switched to Chrome, the subscription remained, periodically launches)
3) a web-app in Chrome on a phone (used before client-app appeared, subscription remained)
4) web-app in Firefox on the phone (spare because it supports proxy, used before client-app appeared, subscription remained)
5) android-app on the phone (currently in use)
Actually the question is how to show a notification in only one application, and not spam everywhere? Like in telegram. It is clear that the service-worker should not receive data, but a link to the data, taking which it will go bad and other clients will not receive them.
It is not clear how to deal with all this:
- notifications to different clients can come with different delays
- the active client (1-4) should be the first to get the data, if there is not one at the moment, then the application on the phone (5), if it is not there either then 3 or 4.
- I noticed such behavior behind the cart that if a notification appeared in the browser, but you did not click on it, then after a while it is duplicated on the phone.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question