Path: csiph.com!news.mixmin.net!news2.arglkargh.de!news.karotte.org!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Jan Bruns Newsgroups: comp.lang.javascript Subject: webpush duplicate notifications Date: 23 Jun 2022 06:41:47 GMT Lines: 35 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Trace: individual.net Wk8m7PYs8TKmtR6hP7lWwQKqtl7aeMKEyR3uMpfejKZVRuv6Io Cancel-Lock: sha1:H1Wk511lMYu8cvg/ikZszynLYzs= User-Agent: Pan/0.145 (Duplicitous mercenary valetism; d7e168a git.gnome.org/pan2) Xref: csiph.com comp.lang.javascript:40919 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