在不运行应用程序的情况下,以固定间隔更新实时图块 [英] Update live tile at fixed interval without having the app running

查看:62
本文介绍了在不运行应用程序的情况下,以固定间隔更新实时图块的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何使用JavaScript以固定的时间间隔(例如半天)更新应用的实时图块?

How can I update my app's live tile at a fixed interval, for example half a day, using JavaScript?

此外,即使应用本身未运行(例如天气应用),它也必须能够更新

Moreover, it has to be able to update even though the app itself is not running (like the weather app for example)

我想在本地更新它而不必连接到互联网.并请用JavaScript举例,而不是C#!

I want to update it locally without having to connect to the internet. And please give some example in JavaScript, not C# please!

例如,要更具体一点,我如何将磁贴设置为每天更新一次,显示当前日期?

To be more specific, for example, how can I set the tile to update once per day, showing the current date?

推荐答案

您可以按计划使用后台任务,且间隔时间不得超过15分钟.这些任务被设计为由与您的应用程序分开的操作系统来运行,因此,如果这些任务未处于活动状态或未打开,则将被执行. 这是有关后台任务入门的详细博客文章:

You can use a background task on a schedule for an interval for anything greater than 15 mins. The tasks are designed to be run by the OS separate to your application, so will be executed if it is not active or open. Here is a detailed blog post on getting started with background tasks: http://www.silverlightshow.net/items/Windows-8-metro-make-your-app-alive-with-background-tasks.aspx

这篇关于在不运行应用程序的情况下,以固定间隔更新实时图块的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆