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).

About these ads