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

编程入门 行业动态 更新时间:2024-10-20 07:53:21
本文介绍了在没有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) whichenables 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应用程序

本文发布于:2023-11-08 20:31:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1570379.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:应用程序   情况下   UI   UWP

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!