Discussion Board

Results 1 to 9 of 9

Thread: N9 Alarm API ?

  1. #1
    Hello there!

    Do developers have any means to show a system alarm notification in N9?
    If there is no straightforward API (which seems to be the case) is there any other way to fulfill the requirements of an alarm?

    The alarm needs to go off:
    - even if in silent mode
    - even if the app has been closed (accidentally)

    I am not usually posting these sort of questions but I have ran out of patience after searching for about a week now for a way to get an alarm notification on N9.

    What I found so far:
    - Qt Mobility lacks an Alarm API
    - Qt Mobility Organizer did not work as I expected (no alarm, no visual notification for elapsed events)
    - There is no Harmattan interface for alarms.
    - There is a Timed Harmattan service which I am trying to figure out. Is this it?

    Thanks in advance!

    Petru

    PS: Found documentation for Timed: http://meego.gitorious.org/meego-mid...master/src/doc
    Last edited by Petru.Motrescu; 2011-08-22 at 08:00.

  2. #2
    I was wrong about (at least) one thing: Timed is actually documented: http://meego.gitorious.org/meego-mid...master/src/doc

  3. #3
    Nokia Developer Moderator achipa's Avatar
    Join Date
    Oct 2009
    Location
    Finland
    Posts
    327
    timed is it if the alarm is time based, the Notifications API can also be useful if it's triggered by something else

  4. #4
    Registered User CaCO3's Avatar
    Join Date
    Jul 2011
    Posts
    69
    I am also fighting with the same issue now since weeks ;(
    What I need is a way to set an alarm like possible with the clock application.
    It has to be able to wake the user up from sleep.
    Also it would be great to have a snooze function and optionally a way I can change the title of the notification dialog.
    I would have to be able to use it from Python or command line or D-BUS.

    I looked into timed, but am not able to understand it. The documentation is not complete and misses IMHO some very important informations like the parameters to set an event through D-BUS..
    I am in contact with some of the maintainers of it, but they also seem not to know for sure if it is actually usable on Harmattan

  5. #5
    Registered User chits007's Avatar
    Join Date
    Sep 2011
    Posts
    1
    I was the developer of N9 Clock UI Application, let me know what doubts you have?

    Few things.
    How Alarm worked earlier: User set an alarm via timed dbus API, while doing so it also sets the dbus interface which needs to be called when alarm expires (see Maemo::Timed::Event::Action in timed docs).This way of triggering alarm has issue that each app (clock/calendar or 3rd party) has no idea of device policy and also the alarm wasn't prioritize.
    Then we created a dbus service called 'visualreminders' (fetch the debian package and see reminderplugininterafce.h)

    New Way: while creating alarm we add another attribute setAttribute("PLUGIN","libclockalarm.so"), now when alarm expires
    timed calls voland (visualreminders),a dbus service, which loads this plugin and calls the interfaces to fetch details.voland also check device policy and if its Ok then only alarm dialog with 'Snooze' & 'Stop' is displayed and alarm tone is played.

    Currently N9 clock app uses new way and I have no idea if old way is still supported or not.

  6. #6
    Nokia Developer Moderator achipa's Avatar
    Join Date
    Oct 2009
    Location
    Finland
    Posts
    327
    And, just realized - there is another time/scheduling related platform API, though not strictly for alarms:

    http://harmattan-dev.nokia.com/docs/...eat.html?tab=0 or, its mobility cousin, http://doc.qt.nokia.com/qtmobility-1...gnedtimer.html

  7. #7
    Registered User nicolaihess's Avatar
    Join Date
    Mar 2004
    Posts
    4
    Quote Originally Posted by chits007 View Post
    fetch the debian package and see reminderplugininterafce.h
    And how would I do this?

  8. #8
    Registered User doctordwarf's Avatar
    Join Date
    Jul 2003
    Location
    Finland, Tampere
    Posts
    1,113
    Quote Originally Posted by achipa View Post
    And, just realized - there is another time/scheduling related platform API, though not strictly for alarms:

    http://harmattan-dev.nokia.com/docs/...eat.html?tab=0 or, its mobility cousin, http://doc.qt.nokia.com/qtmobility-1...gnedtimer.html
    This Hearbeat API is more for chat clients, etc - something that you have already running. If your alarm-like clock is closed, heartbeat won't start it. Though you could probably make your app an invisible daemon started together with the system and the Heartbeat could activate it once in a while.

  9. #9
    Registered User CaCO3's Avatar
    Join Date
    Jul 2011
    Posts
    69
    Quote Originally Posted by chits007 View Post
    New Way: while creating alarm we add another attribute setAttribute("PLUGIN","libclockalarm.so"), now when alarm expires
    timed calls voland (visualreminders),a dbus service, which loads this plugin and calls the interfaces to fetch details.voland also check device policy and if its Ok then only alarm dialog with 'Snooze' & 'Stop' is displayed and alarm tone is played.

    Currently N9 clock app uses new way and I have no idea if old way is still supported or not.
    I am not a c++ developer, so I am not able to adapt/get working the timed simple-client example nor anything else I found
    Does somebody have a working example of setting an alarm/event?
    What I basically need is to be able to set a normal clock alarm through Python/Commandline/DBus. This then should (like the clock app) show an alarm notification with snooze/stop button.

    Does the clock app have a DBUS API? So one could set it via that app?
    Its really sad there is no working example.
    Is the source code of the clock app available? That would give a good start.
    I know there is simple client, but its not documented at all (how are the command line parameters???) nor am I able to compile it with the latest QtCreator

Similar Threads

  1. Replies: 3
    Last Post: 2011-08-01, 14:31
  2. 6101 Alarm sound set (PIM api)
    By iea@e-infonor.com in forum Mobile Web Site Development
    Replies: 8
    Last Post: 2011-01-13, 09:51
  3. S40 Java PIM API tone alarm
    By nokiauser2 in forum Mobile Java General
    Replies: 0
    Last Post: 2009-08-11, 22:05
  4. S40 Java PIM API tone alarm
    By nokiauser2 in forum Series 40 & S60 Platform Feedback Archive
    Replies: 0
    Last Post: 2009-08-07, 11:07

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved