Reputation: 369
I am writing test automation for Windows phone 8.1. After the phone is developer unlocked (to be able to deploy apps), the maximum timeout for keeping the screen unlocked is 5 minutes. The setting is under Settings > Lock Screen > Screen times out after dropdown on the phone.
For Win phone 8.0 there is an option to never time out the screen. My question is, since this seems not to be supported yet by Microsoft, is there some way to keep the phone 8.1 screen active, without having to manually touch it?
Upvotes: 3
Views: 633
Reputation: 51
If you want to develop an App on your device, you only have to unlocked when you run the project (F5).
Anyway, the screen can be forced to stay on using the UserIdleDetectionMode
property of the current PhoneApplicationService
.
To disable automatic screen lock:
PhoneApplicationService.Current.UserIdleDetectionMode = IdleDetectionMode.Disabled;
To enable it again:
PhoneApplicationService.Current.UserIdleDetectionMode = IdleDetectionMode.Enabled;
More information on MSDN
Upvotes: 1