×

Discussion Board

Results 1 to 6 of 6
  1. #1
    Registered User
    Join Date
    Sep 2004
    Posts
    12

    Adding calendar alarms

    Hi guys, lately I've been experimenting with the alarm API (RASCliSession).

    I've tried to add an alarm with a call to RASCliSession::AlarmAdd, but the trick is that I'm setting the alarm category to the category of a calendar alarm (0x101F4A70). One of the reasons to do so, is because you can actually set different sound for calendar alarms in your phone settings so I just want to have this sound when the alarm notifies.

    But to my biggest surprise, when the alarm expiration time comes, it does not show the alarm notification UI. It seems like the calendar is watching the alarms and when an alarm with category 0x101F4A70 tries to pop-up its interface, the calendar server automatically instructs the alarm server to hide the UI - so no notification is visually visible on the screen?

    It there a way to make my alarm really present its notification on the screen?

  2. #2
    Super Contributor
    Join Date
    Mar 2004
    Location
    Singapore
    Posts
    9,968

    Re: Adding calendar alarms

    Might be some problem with how you create it. can you show us how you create it ?

  3. #3
    Registered User
    Join Date
    Sep 2004
    Posts
    12

    Re: Adding calendar alarms

    It is as simple as that:

    TASShdAlarm alarm;
    alarm.Category() = { 0x101F4A70 };

    // Alarm occurs once, today. This is the default.
    alarm.RepeatDefinition() = EAlarmRepeatDefintionRepeatOnce;
    alarm.Message() = _L("Calendar Alarm");

    // Get the local time and set it as the alarm's due time
    alarm.NextDueTime().HomeTime();

    // Add 10 seconds so that we do not wait a whole lot until it expires.
    alarm.NextDueTime() += TTimeIntervalSeconds(10);

    // WriteUserData capability is required to add an alarm
    m_alarmServerSession.AlarmAdd(alarm);

  4. #4
    Super Contributor
    Join Date
    Mar 2004
    Location
    Singapore
    Posts
    9,968

    Re: Adding calendar alarms

    i can see that you have not closed the session is it a typo. http://wiki.forum.nokia.com/index.ph...o_create_alarm

  5. #5
    Registered User
    Join Date
    Sep 2004
    Posts
    12

    Re: Adding calendar alarms

    Hmm, thanks for the link. It states that the example will "pick the same tone set for the calendar application's alarm" even though it does not explicitly set the category to calendar category. I'll try and see if that is the case.

    btw: I'm sure that closing the session has nothing to do with this at all. As I pointed out in my request I observe the behavior only if the alarm category is { 0x101F4A70 }; If I set as category just {0}, then alarm notification screen pops up OK. Closing the session is not a typo. I do keep my session open as long as my application is running.

  6. #6
    Super Contributor
    Join Date
    Mar 2004
    Location
    Singapore
    Posts
    9,968

    Re: Adding calendar alarms

    may be you are facing same problem as mentioned here http://wiki.forum.nokia.com/index.ph...es_are_ignored

Similar Threads

  1. preverify error. PLZ HELP
    By michaelhann89 in forum Mobile Java Tools & SDKs
    Replies: 14
    Last Post: 2007-03-22, 22:51
  2. module adding alarm + delete entries to calendar
    By worlman385 in forum Symbian
    Replies: 0
    Last Post: 2007-02-03, 19:42
  3. Calendar adding 30 days
    By earamsey in forum Mobile Java General
    Replies: 4
    Last Post: 2006-12-22, 12:10
  4. Replies: 1
    Last Post: 2005-10-27, 22:52
  5. 9210 calendar compatible with Outlook calendar ??
    By andre456 in forum Symbian User Interface
    Replies: 0
    Last Post: 2002-09-25, 19:25

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •