Tuesday, 5 August 2008

Stopping home screen on Smartphone and other backlight tricks

If your smartphone application displays information to a user without any user input you may wish to stop the home screen from being shown, or the auto lock from kicking in by reseting the idle timer using:

// prevent home screen from being shown, lock and idle timers
SHIdleTimerReset();


You can force the backlight on and reset the other idle timers using:

SystemIdleTimerReset();
SetSystemPowerState(NULL, POWER_STATE_ON, POWER_FORCE);

The latter works also on PocketPC and Windows CE

No comments: