如何在 Windows Phone 8 的后台运行计时器? [英] How to run a timer on background in windows phone 8?

查看:37
本文介绍了如何在 Windows Phone 8 的后台运行计时器?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个方法可以运行计时器并每 10 分钟显示一次警报.但是当我退出应用程序时,它会停止计时器并且不显示任何警报.

I had a method which runs the timer and displays alert for every 10 minutes. But when I came out of the application it stops the timer and the it does not display any alert.

有人会告诉我如何在后台运行计时器,即使我不使用该应用程序,它也会始终运行并提供定期更新.

Would somebody tell me how to run the timer on background which always runs and gives the regular updates even if I'm not using the app.

有没有办法做到这一点?我读到 Windows Phone 8 将在后台运行任务,但我不知道如何使用它,

Is there a way to do that? I read that the windows phone 8 will run tasks on background but I don't find how to work with it,

我看到了计划代理,但我不明白如何在这种情况下使用它.

I saw the Scheduled Agents but I don't understand how to use that for this scenario.

推荐答案

无论如何(在最好的情况下),预定的代理每 30 分钟才运行一次.请参阅贾斯汀在一个非常相似的问题上的回答,了解您的选项列表以及指向 MSDN 的链接.

Scheduled agents only run every 30 minutes anyway (in the best case scenario). See Justin's answer on a very similar question for a list of your options with links to MSDN.

这篇关于如何在 Windows Phone 8 的后台运行计时器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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