3679b5bdbad354f7018692756fa3156daf077322
[theonering] / src / example_custom_notifier.py
1 #!/usr/bin/env python
2
3 import sys
4
5
6 sys.path.insert(0,"/usr/lib/dialcentral/")
7
8
9 import alarm_notify
10
11
12 def notify_on_change():
13         notifyUser = alarm_notify.is_changed()
14
15         if notifyUser:
16                 import subprocess
17                 import led_handler
18                 led = led_handler.LedHandler()
19                 led.on()
20                 soundOn = subprocess.call("/usr/bin/dbus-send --dest=com.nokia.osso_media_server --print-reply /com/nokia/osso_media_server com.nokia.osso_media_server.music.play_media string:file:///usr/lib/gv-notifier/alert.mp3",shell=True)
21
22
23 if __name__ == "__main__":
24         notify_on_change()