简体   繁体   English

如何保持 Angular PWA 在瞌睡模式下运行

[英]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 .我们正在开发一个 angular PWA 应用程序,该应用程序从lightStreamer 服务器订阅一些数据更改并向用户显示一些通知。 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.如您所知,PWA 是本机应用程序的替代方案,因此我们希望当移动设备进入打盹模式时,我们的应用程序会继续像以前一样工作,并在某些条件成立时发出警报通知。 Is it possible to handle this in angular framework or Service Workers?是否可以在 Angular 框架或 Service Worker 中处理这个问题?

Highly inefficient but it you have to: - WakeLock效率极低,但您必须: - 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.或者,如果您向 ServiceWorker 推送“数据更新”通知,它可以前台或激活您的 Web 应用程序。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM