如何注册Win8定期图块通知? [英] How to register for Win8 periodic tile notifications?

查看:70
本文介绍了如何注册Win8定期图块通知?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发Win8-UI-App(以前称为Metro ...),并尝试实现Periodic(

I am working on a Win8-UI-App (previously called Metro...) and trying to implement Periodic (Documentation for different methods) Tile Updates (Live Tiles) for the first time.

我在互联网上找到了一些非常好的资源,并且能够做到这一点.不幸的是,我应该在哪里注册通知的问题仍未解决:

I found a couple of very good resources on the internet and was able to do it. Unfortunately the question of where I should register for the notifications remained unsolved:

我是否必须每次 注册通知(例如,在App.xaml.cs OnLaunched()方法中)? -或者还有其他更专业的方法吗? (我可以想象是否要保存已注册的服务,或者是否可以访问变量以查看通知是否已注册?)

Do I have to register for Notifications every time the app starts (e.g. in the App.xaml.cs OnLaunched() Method)? - Or is there an other, more professional way to do so? (I could imagine to save if I already registered for the service or is there a variable I can access to see whether notifications are registered?)

谢谢!

PS:对于所有对此也是新手的人,请参见此 StackOverflow帖子,此示例瓷砖模板类型 Dev Center 快速入门:)

PS: For everyone who is also new to this see this StackOverflow post, this example, the tile template types and the Dev Center for quick starting :)

推荐答案

定期更新将继续进行,直到它们为定期更新的指南和清单指出

Periodic updates will continue until they are explicitly stopped or your app is uninstalled. Technically, you only have to do that once. But, the Guidelines and checklist for periodic updates states

分别调用StartPeriodicUpdate或StartPeriodicUpdateBatch方法 应用启动或关注的时间.这样可以确保 用户每次启动或切换时都会更新图块内容 进入应用程序.

Call the StartPeriodicUpdate or StartPeriodicUpdateBatch method each time your app is launched or brought into focus. This ensures that the tile content will be updated each time the user launches or switches to the app.

因此,应用启动和应用恢复是呼叫 StartPeriodicUpdate .

这篇关于如何注册Win8定期图块通知?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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