Background events in progressive web apps? (building an alarm clock app)

ⅰ亾dé卋堺 提交于 2019-12-22 06:34:51

问题


I am playing around with progressive web apps, and one scenario I wanted to try building was an alarm clock app.

I figure to make this app work properly, it will have to run in the background and become active once the internal conditions (current time === alarm time) have been met.

Is this possible? Or do progressive web apps not yet have the freedom to operate in the background/access phone features through API's.

Thanks!


回答1:


Setting background timers isn't yet possible. The ScheduledTask API is probably do what you want, but it's still being discussed, implemented and so on.



来源:https://stackoverflow.com/questions/36944167/background-events-in-progressive-web-apps-building-an-alarm-clock-app

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!