Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to remotely dismiss notifications using web push notifications?

I am using push notifications on the web using the new service worker based API and have this use case:

  • User opts in to receive notifications on multiple devices/platforms
  • We send notifications to them on all devices/platforms
  • User dismisses a notification on one of those devices/platforms
  • We want to now remotely hide that notification from their other devices/platforms

Given the userVisible restrictions with the Push API, is there any way to achieve this experience?

like image 621
owencm Avatar asked Dec 17 '15 22:12

owencm


People also ask

Can push notifications be intercepted?

Push notifications, when implemented properly, are resistant to interception or redirection and are, therefore, more secure than SMS.

Does web push notification work when browser is closed?

The answer is “no” when we are talking about desktop devices like laptops and PCs. However, you can receive browser push notifications on your mobile device without opening your browser app. The only requirement to receive a push is an unlocked screen and an installed and activated browser app like Chrome.

How do you dismiss a notification?

To dismiss a notification, touch it and swipe left or right. Tap the dismiss icon to dismiss all notifications. On newer versions of Android, you can manage some notifications from the lock screen. Double-tap a notification to open the app or swipe left or right to dismiss the notification.


1 Answers

To the best of my knowledge this isn't possible, but it is a common feature request.

The main risk you have with sending a push message to hide a notification is that it may trigger a notification to be shown by the browser which has a message along the lines of:

"example.com performs an update in the background"

like image 52
Matt Gaunt Avatar answered Sep 21 '22 14:09

Matt Gaunt