WP7 – Disabling the Lock Screen

So my first Windows Phone 7 app is a GPS tracking app.  My problem initially was the screen would lock after a few seconds of no touch activity and stop my app.  A GPS tracking app isn’t very effective if you only get the first few points then shuts down.

I assumed this couldn’t be disabled so I thought I was pretty cleaver when I added a video as the app background which disables the lock screen.  Imagine my surprise when slygamer from the connect site mentioned you can disable the lock screen programmatically.  Thanks sly!

PhoneApplicationService.Current.UserIdleDetectionMode = IdleDetectionMode.Disabled;

Works great and I can remove my cheesy background video (and save battery).

7 thoughts on “WP7 – Disabling the Lock Screen

  1. This is awesome news! I also have a great idea for an app but requires the app to remain running when the screen will normally lock up. Thanks for the post!

      1. No, screen stay unlocked. In my case when i lock screen audio stop playing. I found that problem was in url. My link contains query string, which disappear after lock.

Leave a Reply