Windows 8.1 phone screen hold unlocked

I am writing a test automation for a Windows 8.1 phone. After unlocking your phone (for deploying apps), the maximum timeout for unlocking the screen is 5 minutes. The setting is found under "Settings"> "Screen lock"> "Screen" after the drop down menu on the screen.

For Win phone 8.0, it is possible to never leave the screen. My question is that Microsoft doesn't seem to be supported by Microsoft yet, is there a way to keep the 8.1 phone screen active without manually touching it?


source to share

1 answer

If you want to create an app on your device, you only need to unlock it when you start the project (F5).

In any case, the screen can be forced to turn on using the UserIdleDetectionMode

current property PhoneApplicationService


To turn off automatic screen lock:

PhoneApplicationService.Current.UserIdleDetectionMode = IdleDetectionMode.Disabled;


To turn it back on:

PhoneApplicationService.Current.UserIdleDetectionMode = IdleDetectionMode.Enabled;


More information on MSDN



All Articles