Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.javascript > #40919

webpush duplicate notifications

From Jan Bruns <ebay@abnuto.de>
Newsgroups comp.lang.javascript
Subject webpush duplicate notifications
Date 2022-06-23 06:41 +0000
Message-ID <jhig9bF9s16U1@mid.individual.net> (permalink)

Show all headers | View raw


Hallo,

I'm currently playing with a minimalistic webpush setup, using notifies 
without payload (using service worker code to fetch the notification 
cause to display).

For Desktop Chomium+FF, everything seems to work as I expected so far.

But on android, when the fon is in low power mode during the the event, I 
get an additional, android generated notification (about my "app" having 
had an update in the background. I've never noticed such notifications 
before). 

My guess is: if this prob can be solved somehow (without specific user 
interaction), then it could only be the service worker js code. But I'm 
completely out of ideas about what I could try. It's not 
ev.preventDefault(), I guess.

If you can ignore lot's of useless console.logs, hardcoded urls/test msgs 
and outdated comments from tutorial imports, you could have a look at the 
service worker code here:

https://jan.abnuto.de/pushtest/service-worker.js 

Well, maybe using payload notfies could also sanitize things (maybe it's 
a little more clear that visile user notification is intended in that 
case). But payload data would only complicate things up a lot for me, 
especially given that webpush might not yet have reached stable 
specification state.

Gruss

Jan Bruns

Back to comp.lang.javascript | Previous | Next — Next in thread | Find similar | Unroll thread


Thread

webpush duplicate notifications Jan Bruns <ebay@abnuto.de> - 2022-06-23 06:41 +0000
  Re: webpush duplicate notifications Jan Bruns <ebay@abnuto.de> - 2022-06-26 02:42 +0000
    Re: webpush duplicate notifications Jan Bruns <ebay@abnuto.de> - 2022-06-26 05:01 +0000
      Re: webpush duplicate notifications Jan Bruns <ebay@abnuto.de> - 2022-06-27 08:50 +0000
  Re: webpush duplicate notifications Härra Rabmo <ingel1983912@gmail.com> - 2022-07-06 09:13 -0700
  Re: webpush duplicate notifications "He, who travels time to time" <he1983912@aol.com> - 2022-09-22 07:24 -0700

csiph-web