3

I am making an application for Windows Mobile 6.1 Pocket PC (Touchscreen). I know when a Pocket PC's screen turns off, it goes into a standby mode and applications are pretty much halted in the background. My application can't do that. It needs to keep going. So my question is, how can I keep the phone alive (backlight turned on) until my application is done?

An example of this would be video streaming applications such as Youtube. It keeps the phone on while the video is playing.

John Saunders
  • 160,644
  • 26
  • 247
  • 397
QAH
  • 4,200
  • 13
  • 44
  • 52
  • Please use hyphens ("-") between multiple words in a tag. That is, "windows-mobile-6", not "windows mobile 6". – John Saunders Apr 11 '10 at 03:54
  • 2
    Backlight off and suspend mode are two separate things. You don't need to keep the backlight on to have the device still function. – Shaihi Apr 11 '10 at 10:36
  • 1
    See this answer: http://stackoverflow.com/questions/246407/disable-sleep-mode-in-windows-mobile-6/246794#246794 – MusiGenesis Apr 11 '10 at 04:21

1 Answers1

3

As long as your app is doing something (in a loop or a Timer) it is relatively easy, you need:

public static class CoreTools
{
    [DllImport("coredll.dll")]
    public static extern void SystemIdleTimerReset();
}

And then call SystemIdleTimerReset() regularly.

H H
  • 263,252
  • 30
  • 330
  • 514