如何在没有UI的情况下使用UWP创建后台应用程序? [英] How to create a background application using UWP without UI?

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

问题描述

我需要在后台运行BLE Discovery,并且需要在找到设备时显示toast。这是使用UWP和UI完成的。但我只需要后台应用程序。有什么办法吗?



我的尝试:



我尝试过使用UWP Application和Windows运行时组件。但我无法隐藏UI。

I need to run a BLE Discovery in background and need to show toast when a device found.This is done using UWP with UI. But I need only background application. Is there any way?

What I have tried:

I have tried using UWP Application and a Windows Runtime Component. But I am not able to hide the UI.

推荐答案

您不能只创建没有任何UI的后台应用程序。相反,您可以创建一个使用BackgroundTask发送Toast通知的单页应用程序。



使用后台任务支持您的应用 [ ^ ]
You can't just create a background application without any UI. Instead you can create a one page app which uses BackgroundTask for send toast notification.

Support your app with background tasks[^]


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

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