Search code examples
angularservice-workerprogressive-web-appsangular-service-worker

How to keep angular PWA running in doze mode


We are developing an angular PWA application that subscribes to some data changes from a lightStreamer Server and shows some notifications to user . As you know, PWAs are alternative for native apps, so we expect that when mobile goes to doze mode, our application continues to doing it's job as before and alarms notification when some conditions being established. Is it possible to handle this in angular framework or Service Workers?


Solution

  • Highly inefficient but it you have to: - WakeLock

    Support is a bit of a problem at the moment :-(

    Alternatively, if you PUSH a "data updated" notification to your ServiceWorker it can foreground or activate your Web App.