In windows 8 metro style app, how to update live tile while app is not running?

喜欢而已 提交于 2019-12-02 19:48:10

Okay, let's get you answered! Here is every single way and resources for each way to get you started. Your scenario isn't clear to me, so I will try to be generic.

There are four ways to update a live tile in Windows 8! And this is true for the primary app tile and the subsequent secondary tiles created by the app, too.

1> The first is that the app, while running, can update the tile

But, you were asking how to update when it is not running:

2> A user can deploy a background task with their Windows 8 app. This background task executes periodically and can update the tile of the app during its execution. The minimum frequency of background tasks is 15 minutes. Windows 8 allocates 1 CPU second every two hours to a task. Your task can execute as often as you want until you exhaust its allocation.

3> An app can open a WNS (Windows Notification Services) channel while it is running. When it is not running, a web service can push tile updates across WNS.

4> A tile can be configured to pull from a URL. The XML from that URL is periodically evaluated for deltas and the tile is refreshed when detected. Tiles expire by default after three days.

Point of clarification: you can't cause something like a tile update when the OS is booted. For one, in Windows 8 the idea of rebooting (or at least shutting down) is practically deprecated. But your Store app can only execute in the ways above - and can't do something like the StartUp folder (in the past) or RegEdit/Run (in the past) just the stuff above. But maintenance or timer triggers get you pretty close.

And, that's the answer. Best of luck, dude!

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