3 ms·
I'm currently attempting to write a calendar app for personal use, and I wanted to go the route of a self-host PWA. Notifications are a good point. How can I cr
by mr_mitm 3mo ago
I'm currently attempting to write a calendar app for personal use, and I wanted to go the route of a self-host PWA. Notifications are a good point. How can I create notifications as a reminder before an event? Alerts are part of the icalendar standard ("VALARM"), so these are clearly notifications that are wanted by the user. Is that even possible for a PWA?
- whstl 3mo agoYou can send notifications with PWAs with Web Push API + Service Worker, same as a regular page. But, AFAIK, you need the server for push, though. It used to be possible to program entirely from the client with this proposed feature but AFAIK it's abandoned: https://github.com/GoogleChrome/developer.chrome.com//blob/main/site/en/docs/web-platform/notification-triggers/index.md https://github.com/GoogleChrome/developer.chrome.com//blob/m...
- mr_mitm 3mo ago> You can send notifications with PWAs with Web Push API + Service Worker, same as a regular page. While the app is awake, sure. I'd like notifications to work even if the OS backgrounded the app, and even without a network connection, like I'd expect a reminder to work. > https://github.com/GoogleChrome/developer.chrome.com//blob/main/site/en/docs/web-platform/notification-triggers/index.md https://github.com/GoogleChrome/developer.chrome.com//blob/m... Looks like this is what I need and it doesn't exist. So the short answer is "no". Thanks for the link!
- whstl 3mo ago> While the app is awake, sure. That's not true. The browser's push service wakes the service worker on delivery, even if the PWA is fully closed. That's the entire point of Push API vs polling.
- deleted 3mo ago[deleted]