Prevent tablet from sleeping while app is running
Asked Answered
M

2

5

I'm trying to write a Windows 8 tablet app that often can go multiple minutes between receiving input.

The problem is, that if i don't keep touching the screen, the power saver will activate, and the screen will automatically go black, and it disrupts the user of the app.

Is there a way that my app can prevent the power saver from activating, or at least extend the time it takes for the power saver to activate.

Mahdi answered 2/11, 2012 at 19:55 Comment(0)
F
8

You should use DisplayRequest class to keep screen from turning off.

Apps that show video or run for extended periods without user input can request that the display remain on by calling DisplayRequest::RequestActive. When a display request is activated, the device's display remains on while the app is visible. When the user moves the app out of the foreground, the system deactivates the app's display requests and reactivates them when the app returns to the foreground.

Fecteau answered 2/11, 2012 at 20:8 Comment(0)
F
-7

Go to your screen saver in personalization settings. Select none.

Flock answered 30/12, 2014 at 2:10 Comment(1)
This is not a good answer: The question is old, it already has a well-received, accepted answer, and your answer doesn't actually solve the problem.Seigler

© 2022 - 2024 — McMap. All rights reserved.