Nick's .NET Travels

Continually looking for the yellow brick road so I can catch me a wizard....

Fighting the Lock Screen in Windows Phone 7 by disabling IdleDetectionMode

One of the things you may experience with your Windows Phone application is that it will get suspended when the lock screen is displayed. As the lock screen appears after a relatively short period of time this can be particularly frustrating if you have to synchronize a large quantity of data, or you have created a game that only requires the accelerometer (no user input on the screen can result in the application appearing to be idle). To get around this you can disable idle detection by setting one of two properties.

Microsoft.Phone.Shell.PhoneApplicationService.Current.ApplicationIdleDetectionMode

Or

Microsoft.Phone.Shell.PhoneApplicationService.Current.UserIdleDetectionMode

Essentially setting the UserIdleDetectionMode to disabled will prevent the lock screen automatically appearing, whilst setting ApplicationIdleDetectionMode to disabled will allow the application to continue to operate whilst the lock screen is active. Note that there is a clause in the application certification requirements that stipulate the conditions with which you must comply when setting these properties.

  • khan maidana

    11/12/2010 1:26:29 AM |

    nice blog..... i loved reading it.....

  • UFC 125

    15/12/2010 4:31:45 AM |

    hi! i like your blog., its very interesting and i learn a lot it. thank for the information here.....

    http://www.conceptart.org/forums/member.php?u=263041
    http://renanorola.i.ph/blogs/renanorola/2010/12/14/online-boys-and-girls-games-for-everybody/
    http://newpressrelease.com/art-entertaiment/5066-play-free-girls-games-online-to-enjoy
    http://www.afly.com/view_release.php?rel_id=142273
    http://www.ideamarketers.com/?articleid=1721207
    http://www.information-online.com/node/132030
    http://www.lets-find-out.com/games/play-free-girls-games-online-to-enjoy/

  • John Melville

    9/01/2011 7:54:30 AM |

    Thanks, was exactly the info I needed.`

  • cell phone detector

    17/04/2014 1:54:18 AM |

    Useful information shared. I am very happy to read this. Thanks for giving us nice info.
    <a href= http://www.cellbusters.com/zone-detector-the-ultimate-in-cell-phone-detection> cell phone detector</a>

Pingbacks and trackbacks (1)+

Comments are closed