Counting alarms the new way

Login to reply to this topic.
Fri, 2006-03-24 19:41
Joined: 2004-08-19
Forum posts: 112
Hello,

I'd need to get the number of pending alarms. RAlarmServer works all right but the documentation says it's deprecated. So, I thought I would play it nice and tried the new way:

Code:
static const TUid KUidNull = {0};
RASCliSession Alarm;
Alarm.Connect ();
if (Alarm.GetAlarmCountForCategory (KASCliCategoryClock) > 0) {
  ...
  }
Alarm.Close ();

No error but it doesn't work. Am I doing something wrong?

Thanks,
  Gábor

Bye,
Gábor


Fri, 2006-03-24 22:15
Joined: 2004-08-19
Forum posts: 112
Re: Counting alarms the new way
The plot thickens. It doesn't really work the old way, either. More precisely, it works, but not exactly as I expect it. Using RAlarmServer:AlarmCount (ECountNext) returns the number of all pending alarms, including those set in the calendar for some distant future date. I'd like to know the number of pending clock alarms but AlarmCount () doesn't offer it.

So is there a reliable method to query the number of pending clock alarms?

Bye,
Gábor

  • Login to reply to this topic.