View Single Post
Posts: 105 | Thanked: 299 times | Joined on Sep 2010
#50
I'm so sorry I really want to fix this, but I can't find how to detect when the headphone is connected, I will look into it, it should be easy as with the BT, but it's not ..

I'm trying with this:
Code:
QDBusConnection::systemBus().connect("com.nokia.policy.pcfd",
                                                   "/com/nokia/policy/audio_route","org.maemo.contextkit.Property",
                                                   "ValueChanged", this, SLOT(headsetConnection(const QDBusMessage& msg)));
but my method is never called, and using dbus-monitor (system bus) I can see this:
Code:
signal sender=:1.33 -> dest=(null destination) serial=297 path=/com/nokia/policy/audio_route; interface=org.maemo.contextkit.Property; member=ValueChanged
   array [
      variant          string "headset"
   ]
   uint64 6577358612055
So there has to be a way to detect the when the headphone is plugged in..

Anyway, I didn't relased the source before so here it is
http://iktwo.com/wp-content/uploads/...witcher.tar.gz
 

The Following 2 Users Say Thank You to Iktwo For This Useful Post: