最小化时,[UWP]应用程序不会启动Toast通知 [英] [UWP] app does not initiate toast notifications when minimized

查看:73
本文介绍了最小化时,[UWP]应用程序不会启动Toast通知的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,我最近在C#中开发了一个UWP应用程序,它会抛出大量的Toast通知,但我注意到这只适用于应用程序尚未最小化的情况。请帮我解决这个问题。我希望应用程序即使在最小化时也会发出通知。谢谢
:)

解决方案

地狱,


如果你会更好分享一些代码。但是我想你会从应用程序中显示吐司通知,而不是你的后台任务。当应用程序最小化时,Windows会暂停它以节省资源,如电池,并且您的kod不执行
,因为您应该使用后台任务。请阅读此处了解更多信息
https:// msdn。 microsoft.com/en-us/windows/uwp/controls-and-patterns/tiles-badges-notifications
功能


Hello, I recently develop an UWP app in C# that throws bunch of toast notifications but I noticed that this works only when the app has not been minimized. Please help me fix that. I want the app to throw notifications even when it is minimized. Thanks :)

解决方案

Hell,

It will be better if you share some code. But I guess that you show toast notification from application  and don't yous background task for that. When app is minimized then windows suspend it for saving resources like battery and your kod doesn't execute for that you should use background tasks. Read here for more https://msdn.microsoft.com/en-us/windows/uwp/controls-and-patterns/tiles-badges-notifications 


这篇关于最小化时,[UWP]应用程序不会启动Toast通知的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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