Read-only archive of the All About Symbian forum (2001–2013) · About this archive

clock alarm

1 replies · 2,319 views · Started 06 February 2003

Hi,

I'd like to write a program that for example will start and play a sound at specified time.
Could you write how to make a program starting at specified time?
I don't want to make my application running all the time and check time every second
( 1) batery!, 2) program is always visible in taskmenu )

Is there a server of time or sth like that, where I can register my application to run at specified time or do I have to write my own server?
In what way was original N7650 alarm clock or calendar's events developed?
(I think that my implementation should be very close to these programs)
Can you post an example code?

thanks in advance,
jack

You don't have to poll the system every second to see if the correct time has arrived. You can ask the system to wake your application at the correct time. Look at the At(.....) function in the different timer classes, e.g. RTimer::At(TTime aWakeupTime).

I don't know if you can set up the system so that it will automatically start your application at a specific time. I think you will have to keep your application in the background.

If you want to have a alarm at a specific time, even when your application is no longer running, then you can use the alarm server for that. Look at the documentation for the orphaned alarms (or something like that).