Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Locked screen in windows 8 WinRT

When my app is running in Windows 8 WINRT can I prevent the OS to go to locked screen/sleep mode?

like image 233
reachify Avatar asked Oct 06 '12 10:10

reachify


2 Answers

You can use the DisplayRequest class to indicate that you are busy playing back something that requires the display to stay active and un-dimmed. A good how-to article with sample code is available here. Don't use it frivolously, it is quite detrimental to power consumption. Good odds that the Store will reject your app if you use it for no obvious benefit to the user.

like image 100
Hans Passant Avatar answered Nov 14 '22 11:11

Hans Passant


You cannot prevent OS to go to lock screen/sleep/shut-down etc. If you want your application to run behind the scenes, you may want to create a Background Task application. You can find more information at: MSDN Link

like image 29
Mayur Tendulkar Avatar answered Nov 14 '22 10:11

Mayur Tendulkar