简体   繁体   中英

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

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?

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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