|
2013-02-15
, 13:21
|
Posts: 277 |
Thanked: 319 times |
Joined on Jan 2010
|
#1102
|
|
2013-02-15
, 20:16
|
Posts: 1,313 |
Thanked: 2,977 times |
Joined on Jun 2011
@ Finland
|
#1103
|
Had a little time to test the alarm action. Seems to work ok except for the obvious snooze problem. I don't know how c++ works but in the simple-client source code, snooze is set with event.setSnooze. I suppose it's not that simple?
Is it at all possible to set the 'application' value as 'clock' so maybe the alarm(s) would show in the stock application? I mainly ask because it's now (almost) impossible to for example cancel a set alarm.
I also got a call when testing this and had some peculiar behaviour when the alarm was supposed to go off while the call was active. The alarm went off only when I brought the ProfileMatic UI to the front.
I'll test some more tomorrow once I'm sober enough... Have a good weekend!
|
2013-02-16
, 15:50
|
Posts: 277 |
Thanked: 319 times |
Joined on Jan 2010
|
#1104
|
I put into the new beta the application as clock. It shows in the stock application. Unfortunately it shows always 00:00 as time. And trying to disable the alarm has no effect at all. I do not know how that could be fixed, so I'm leaning on it being better not shown at all in the stock application if it can't be controlled...
QMap(("APPLICATION", QVariant(QString, "clock") ) ( "COOKIE" , QVariant(QString, "25124") ) ( "PLUGIN", QVariant(QString, "libclockalarm") ) ( "STATE" , QVariant(QString, "QUEUED") ) ( "TITLE" , QVariant(QString, "Guuu") ) )
QMap(("APPLICATION", QVariant(QString, "clock") ) ( "COOKIE" , QVariant(QString, "25125") ) ( "PLUGIN" , QVariant(QString, "libclockalarm") ) ( "STATE" , QVariant(QString, "QUEUED") ) ( "TITLE" , QVariant(QString, "Test") ) ( "alarmtime" , QVariant(QString, "07:30") ) ( "enabled" , QVariant(QString, "1") ) ( "snooze" , QVariant(QString, "10") ) ( "sound" , QVariant(QString, "/usr/share/sounds/ring-tones/Clock 2.mp3") ) ( "trigger" , QVariant(QString, "1361079000") )
That is weird... and I can only guess that me setting application as ProfileMatic in that beta could somehow affect that. I have not experienced such problems, but I have not also had an alarm during phone call. Let me know if you find out more.
The Following User Says Thank You to slarti For This Useful Post: | ||
|
2013-02-16
, 16:25
|
Posts: 277 |
Thanked: 319 times |
Joined on Jan 2010
|
#1105
|
|
2013-02-16
, 16:44
|
Posts: 1,313 |
Thanked: 2,977 times |
Joined on Jun 2011
@ Finland
|
#1106
|
The Following User Says Thank You to ajalkane For This Useful Post: | ||
|
2013-02-17
, 10:54
|
Posts: 277 |
Thanked: 319 times |
Joined on Jan 2010
|
#1107
|
And can set the sound file individually for each alarm? Must include that if it works.
The third pair of numbers in time structure are seconds. Not really used by PM so that's why they are always zero.
The Following User Says Thank You to slarti For This Useful Post: | ||
|
2013-02-18
, 17:24
|
Posts: 1,313 |
Thanked: 2,977 times |
Joined on Jun 2011
@ Finland
|
#1108
|
I think this is fixable. You just need a few more attributes set for the event to make sense to the clock application.
Here are the attributes from an event set by PM:
Code:QMap(("APPLICATION", QVariant(QString, "clock") ) ( "COOKIE" , QVariant(QString, "25124") ) ( "PLUGIN", QVariant(QString, "libclockalarm") ) ( "STATE" , QVariant(QString, "QUEUED") ) ( "TITLE" , QVariant(QString, "Guuu") ) )
|
2013-02-18
, 17:49
|
Posts: 277 |
Thanked: 319 times |
Joined on Jan 2010
|
#1109
|
#!/usr/bin/python import dbus bus = dbus.SystemBus() time_obj = bus.get_object('com.nokia.time', '/com/nokia/time') time_intf = dbus.Interface(time_obj, 'com.nokia.time') cookies = time_intf.get_cookies_by_attributes({'APPLICATION': 'clock'}) for cookie in cookies: attributes = time_intf.query_attributes(cookie) print cookie for key,value in attributes.items(): print ' '+key,value
The Following User Says Thank You to slarti For This Useful Post: | ||
|
2013-02-18
, 23:23
|
Posts: 1,313 |
Thanked: 2,977 times |
Joined on Jun 2011
@ Finland
|
#1110
|
The Following 7 Users Say Thank You to ajalkane For This Useful Post: | ||
My N9/N950 projects: