chrome notifications unsubscribe event chrome notifications unsubscribe event google-chrome google-chrome

chrome notifications unsubscribe event


Your looking for the pushsubscriptionchange event

self.addEventListener('pushsubscriptionchange', function() {  // remove the entry from DB});


Unsubscribe is browser setting that can be done by settings tab and offline mode so you cannot get that information

But Once the user has unsubscribed (i.e. deleted the service worker registration), then on sending the next message you should get a failure message from the FCM API.(if you are using firebase)

So think in this way .... :)