简体   繁体   English

即使是UWP应用,Windows也会睡眠

[英]Windows sleep even for UWP apps

In my app I have UP and DOWN channels which continuously listen for Audio stream. 在我的应用程序中,我有UP和DOWN频道,不断收听音频流。 I want to know that In windows is there any event which will tell me that machine is now going to sleep state (not sign-out because machine will go to sleep after sign-out based on the user settings) so that i can suspend the channels and once machine wake-up(Not sign-in because machine wake up before the sign-in even) then i can resume it again. 我想知道在Windows中有任何事件会告诉我机器现在处于睡眠状态(不签出,因为机器将在根据用户设置注销后进入睡眠状态)以便我可以暂停通道和一旦机器唤醒(因为机器在登录前唤醒,所以没有登录)然后我可以再次恢复它。

Something similar to Cortana 类似于Cortana的东西 在此输入图像描述

Thanks in advance. 提前致谢。

There's no 'sleep' relevant APIs for you to detect if the windows will go to sleep in UWP. 没有“睡眠”相关API可供您检测窗口是否会在UWP中进入睡眠状态。

If you check the Windows 10 universal Windows platform (UWP) app lifecycle , you will find that Suspending and Resuming are the right events to listen to. 如果您检查Windows 10通用Windows平台(UWP)应用程序生命周期 ,您会发现Suspending和Resuming是正确的事件。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM