Reputation: 4201
Is it possible to trigger push notifications (on iOS and/or Android) from a web application while offline?
As I understand it, even with a Service Worker background process, push notifications are always triggered via a server - which seems to preclude reliable offline reminders or anything like that.
Upvotes: 8
Views: 6302
Reputation: 6726
There is Notifications which works offline, but you cannot call it from "background" (e.g. when your web page is closed).
"Background task" (or similar feature) is not available yet on the web, and I'm not sure it's a good idea to bring that power to the web. The closest thing you can do that sounds like "background" is MediaSession that allows you to play music and handle media controls on your hardware devices.
Upvotes: 9