Archived:Using alarms to power up an S60 device
S60 devices that are switched off can switch on automatically to react to alarm events.
In the alarm startup mode, the user will see and hear the alarm and can choose whether the phone will be switched on.
The alarm server (RASCliSession) can be used to set an alarm to wake up the phone in the alarm startup mode.
Alarms can be set programmatically to turn on the device (in alarm startup mode) at a specified time. Note however, that there are no APIs available to initiate a normal power-up cycle directly - when using alarms, user interaction is required to switch on the device in alarm startup mode.
A specific flag must be set for the alarm (TASShdAlarm) to indicate that it is a wakeup alarm and should wake the device up even when powered off.
const TInt KWakeupAlarmFlagIndex = 0;
alarm.ClientFlags().Set( KWakeupAlarmFlagIndex );