且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

在没有UI的情况下运行UWP应用程序

更新时间:2022-11-03 13:07:25

基于根据你的话,你想在从服务器获取数据并且不想拥有客户端UI界面时创建通知,对吗?

Based on your words, you want to create notification when you get data from the server and you do not want have a client UI interface, right?

实际上这可以使用Windows推送通知服务来完成(WNS),它允许第三方开发人员从您自己的云服务发送烤面包,磁贴,徽章和原始更新。 

Actually this could be done using Windows Push Notification Services (WNS) which enables third-party developers to send toast, tile, badge, and raw updates from your own cloud service. 

如果您使用的是WNS,那么您只需要做的是运行你的应用程序一次注册一个频道。这需要一些UI界面,因为您可能需要为注册配置一些东西。然后你可以创建一个后台任务,在
过期后重新注册频道,不需要UI界面。 

If you are using WNS, all you need to do is to run your app once to register a channel. This needs some UI interface as you might need to configure some thing for the registration. Then you could create a background task to re-register the channel after is expired which don't need UI interface. 

你可以在这里获得更多关于WNS的信息: Windows推送通知服务(WNS)概述 并且您需要在这里了解后台任务:指南后台任务

You could get more information here about WNS:Windows Push Notification Services (WNS) overview  And you learn about background task here:Guidelines for background tasks.

祝你好运,

Roy