I am using C# to develop a UWP app for Windows 10 running only on desktop computers, targeting platform version 10.0.14393.0. Due to business requirements, the app lifecycle must behave like a traditional Win32 application.
Therefore, I followed the recommendation from this article to request an ExtendedExecutionSession
with ExtendedExecutionReason.Unspecified
. I also configured Windows to never sleep and never hibernate.
Still, on rare occasions, Windows will revoke the extended execution session with reason SystemPolicy
and then proceed to suspend the UWP app.
Two questions:
- How can I get more information (system logs? event logs?) regarding what led to Windows revoking the extended execution session?
- How can I get rid of these rare cases of suspensions so that the UWP app lifecycle behaves exactly like Win32 applications (that is, stay running until user explicitly stops it from running)?
Thanks!
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…