Local push notification to Win8 Live Tile running JS code inside app

守給你的承諾、 提交于 2019-12-10 19:12:43

问题


I am trying to send updates to my app's tile. This works fine when the app is running. I can, for example, easily send a tile update notification to the tile when the user clicks a button.

What I can't work out is how to update the tile when the app isn't working. The only option I have found for this is to poll (or push from) a remote webserver using REST on HTTP. This isn't ideal for me, and I cannot believe that is the only method of updating the tile.

Ideal here would be to specify a local JS file that is to get run at any given interval, let's say 15 mins as per the Tile guidelines.

As stated I am using JavaScript throughout, not C#.

Is this possible?


回答1:


You have a couple of choices. You can implement a Background task for your application that can update the tile. See the Background Quickstart for info on getting started with that. Day 21 of GenerationApp also provides more info on working with background tasks.

Another option is to use Push Notifications. You can read the overview of Push notifications and also checkout Azure Mobile Services for an easy way to provision notifications in the cloud.



来源:https://stackoverflow.com/questions/14709338/local-push-notification-to-win8-live-tile-running-js-code-inside-app

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