The Following User Says Thank You to ajalkane For This Useful Post: | ||
|
2013-02-13
, 21:42
|
Posts: 1,313 |
Thanked: 2,977 times |
Joined on Jun 2011
@ Finland
|
#1092
|
The Following 6 Users Say Thank You to ajalkane For This Useful Post: | ||
|
2013-02-13
, 22:12
|
|
Posts: 5,339 |
Thanked: 4,133 times |
Joined on Jan 2010
@ Israel
|
#1093
|
Schturman,
please look into the beta version available here:
http://talk.maemo.org/showpost.php?p...postcount=1022
Let me know if using that version solves your problem - I hope so.
|
2013-02-13
, 23:03
|
Posts: 1,313 |
Thanked: 2,977 times |
Joined on Jun 2011
@ Finland
|
#1094
|
The Following 15 Users Say Thank You to ajalkane For This Useful Post: | ||
|
2013-02-14
, 22:46
|
Posts: 1,313 |
Thanked: 2,977 times |
Joined on Jun 2011
@ Finland
|
#1095
|
void HarmattanPlatformUtil::scheduleAlarm(const QString &title, int alarmInSeconds) { // Mostly copied from example given by Cristi Boian here: http://www.cristiboian.com/2012/05/setting-alarms-in-harmattan-nokia-n9.html IFDEBUG(qDebug() << "HarmattanPlatformUtil::scheduleAlarm title" << title << "alarmInSeconds" << alarmInSeconds); Maemo::Timed::Event event; event.setAttribute("APPLICATION", "ProfileMatic"); event.setAttribute("TITLE", title); event.setAttribute("PLUGIN", "libclockalarm"); event.setBootFlag(); event.setAlarmFlag(); event.setReminderFlag(); // Try to hide the snooze button - does not work event.hideSnoozeButton1(); // Hard code snooze for 10 minutes - does not work event.setTimeoutSnooze(10 * 60); // set the alarm in given amount of seconds from now - at least this seems to work event.setTicker(QDateTime::currentDateTime().toTime_t() + alarmInSeconds); // timed interface setup Maemo::Timed::Interface timedIface; if(!timedIface.isValid()) { IFDEBUG(qDebug() << "HarmattanPlatformUtil::scheduleAlarm Invalid timed interface:" << timedIface.lastError()); return; } // add the event QDBusReply<uint> reply = timedIface.add_event_sync(event); if(!reply.isValid()) { IFDEBUG(qDebug() << "HarmattanPlatformUtil::scheduleAlarm Adding event failed:" << reply.error().message()); return; } IFDEBUG(qDebug() << "HarmattanPlatformUtil::scheduleAlarm Added event with cookie" << reply.value()); }
|
2013-02-15
, 06:31
|
Posts: 277 |
Thanked: 319 times |
Joined on Jan 2010
|
#1096
|
The Following User Says Thank You to slarti For This Useful Post: | ||
|
2013-02-15
, 06:48
|
Posts: 1,313 |
Thanked: 2,977 times |
Joined on Jun 2011
@ Finland
|
#1097
|
For some reason there isn't an alarm action as an option in the linked version. Did you upload a wrong version or is there something more serious going on?
It says version 2.0.1 in the about section. I even tried a reboot.
The Following User Says Thank You to ajalkane For This Useful Post: | ||
|
2013-02-15
, 10:05
|
Moderator |
Posts: 6,215 |
Thanked: 6,400 times |
Joined on Nov 2011
|
#1098
|
#!/bin/sh stop=$(/sbin/stop bme) dbus-send --print-reply --dest=com.meego.core.MNotificationManager/notificationmanager com.meego.core.MNotificationManager.addNotification uint32:0 uint32:0 string:'device' string:'' string:"$stop" string:'' string:'' uint32:0 sleep 10 start=$(/sbin/start bme) dbus-send --print-reply --dest=com.meego.core.MNotificationManager/notificationmanager com.meego.core.MNotificationManager.addNotification uint32:0 uint32:0 string:'device' string:'' string:"$start" string:'' string:'' uint32:0
|
2013-02-15
, 10:23
|
|
Posts: 956 |
Thanked: 2,628 times |
Joined on Nov 2011
|
#1099
|
|
2013-02-15
, 10:55
|
Posts: 1,313 |
Thanked: 2,977 times |
Joined on Jun 2011
@ Finland
|
#1100
|
ajalkane,
For the bme restart I've been using a dbus call to display the bme stop/start output so that I do know for sure when bme has been restarted; not sure if its of any use:
I've tested more and the first sleep 10 seems not too necessary for me at least...Code:#!/bin/sh stop=$(/sbin/stop bme) dbus-send --print-reply --dest=com.meego.core.MNotificationManager/notificationmanager com.meego.core.MNotificationManager.addNotification uint32:0 uint32:0 string:'device' string:'' string:"$stop" string:'' string:'' uint32:0 sleep 10 start=$(/sbin/start bme) dbus-send --print-reply --dest=com.meego.core.MNotificationManager/notificationmanager com.meego.core.MNotificationManager.addNotification uint32:0 uint32:0 string:'device' string:'' string:"$start" string:'' string:'' uint32:0
The Following User Says Thank You to ajalkane For This Useful Post: | ||
please look into the beta version available here:
http://talk.maemo.org/showpost.php?p...postcount=1022
Let me know if using that version solves your problem - I hope so.
My N9/N950 projects: