views:

44

answers:

0

Hello,

I am trying to handle battery status changes in openmoko program by the following python code, but it does not help:

self.m_main_loop = gobject.MainLoop() self.m_bus = dbus.SystemBus() self.m_bus.add_signal_receiver(self.on_power_status_change, "PowerStatus", "org.freesmartphone.PowerSupply", "org.freesmartphone.odeviced", "/org/freesmartphone/Device/PowerSupply/battery") self.m_main_loop.run()

on_power_status_change is not called when openmoko generates "Battery is in low". The same problem exists when I try to handle System Action:

self.m_bus.add_signal_receiver(self.on_system_status_changed, "SystemAction", "org.freesmartphone.Usage", "org.freesmartphone.ousaged", "/org/freesmartphone/Usage")

Would anybody say what is wrong?

Thanks in advance. Anna.