New! GraphQL.NET Cookbook by Senthil Kumar Balu

How to Disable from autolocking the screen in Windows Phone App ?

In Windows Phone , you can set the autolocking feature of the screen if the user doesn’t interact with the Windows Phone Device for sometime.

You can Disable this feature only for your App so that that the auto locking of the screen doesn;t happen when your App is running in Windows Phone. A simple example turn by turn navigation app that can guide you for to reach the destination . The user might not want the Windows Phone device to be autolocked inbetween although the user is not physically interacting with the Windows Phone screen.

You can disable the autolocking the screen in Windows Phone App by setting the PhoneApplicationService.Current.UserIdleDetectionMode to Disable .

PhoneApplicationService.Current.UserIdleDetectionMode = IdleDetectionMode.Disabled;
Senthil Kumar B
Senthil Kumar is a former Microsoft MVP (Most Valuable Professional). He is a Co-Author of the book "Windows 10 Development Recipes using JavaScript and CSS" for Apress Publication. He is a technical presenter, blogger, mentor and a Geek.  Senthil is a regular speaker is various local user groups. He has presented at conferences like Great Indian Developer Summit (GIDS) & Microsoft DevCamps. You can reach out to him via his Twitter handle @isenthil.