在没有UI的情况下运行UWP应用程序 [英] Running UWP app with no UI

查看:77
本文介绍了在没有UI的情况下运行UWP应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,

这是我的问题。我必须创建一个在后台运行的C#应用​​程序(没有UI)。这个应用程序从我的服务器接收数据,并与数据,它将创建一个Toast通知。问题是我找不到任何方式没有任何UI。 
$


是否有可能运行UWP 没有UI的应用程序(任务栏中没有图标)。那可以创造吐司吗?或者有没有办法在  C#创建吐司并且可以在后台运行? 

Here is my problem. I must create an C# app that is run in background (with no UI). This app receive datas from my server, and with datas it will create a toast Notification. The problem is I can't find any way not to have any UI. 

Is there any possibility to run an UWP  App with no UI (and no icon in taskbar). That can create Toast ? Or is there any way in  C# to create toast and that can be run in background ? 

如果您需要更多信息,我会在那里。

if you need more information I'll be there.

谢谢,

Nicolas Braillard

Nicolas Braillard

推荐答案

基于根据你的话,你想在从服务器获取数据并且不想拥有客户端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


这篇关于在没有UI的情况下运行UWP应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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