Problem with org.freedesktop.DBus.Properties PropertiesChanged signal

Arnaud Tanguy arn.tanguy at
Mon Oct 1 10:58:58 PDT 2012

I'm currently creating an Android application aiming to be able to fully
control all multimedia application using DBus system. That way, I would be
able to control pretty much all of linux audio and video programs from a
single application and server, nice ;)

I managed to go pretty far on my own, the android application works (with a
minimal set of functionalities for now), the MPRIS1 interface works
perfectly, and MPRIS2 is well on the way, but for a single problem that
kept me stuck for a while now.

I need to connect my application to the signal
Here is how the signals are organised :
Bus name: org.bansheeproject.Banshee
Object Path : /org/mpris/MediaPlayer2
Interface : org.freedesktop.DBus.Properties (containing the
PropertiesChanged signal)

So I applied the same principle I used successfully until then to try to
use this signal:
- Create an interface extending DBusInterface, and using the annotation

- Creating a handler implementing DBusSigHandler

- Connecting the the handler to dbus via the addSigHandler function

But this time, it doesn't work. I think I might be doing something wrong
about the fact that the interface is org.freedesktop.DBus.Properties.
Usually I dealt with interfaces that had the same name as the object path
(like org.mpris.MediaPlayer2.Player for instance).

Here are the relevant (adapted to be more readable) code part, and stripped
bare of anything useless to solve my problem

** File:
String serviceBusName = "org.mpris.MediaPlayer2.banshee";
String playerPath = "/org/mpris/MediaPlayer2";
String playerPropertiesInterface = "org.mpris.MediaPlayer2.Player";
        trackListObjectPath = "/TrackList";
protected static DBusConnection conn =

PropertiesHandler pHandler = new PropertiesHandler();

// This one works perfectly
SeekedHandler seekedHandler = new SeekedHandler(server);

** File :
I wanted to put it into, but obviously
I can't, because the interface already exists...
I think that it is the source of my problem, since I don't quite understand
the relationship between the annotation, and the package location...
public interface PropertiesChangedSignal extends DBusInterface {

    public static class PropertiesChanged extends DBusSignal {
        public final Map<String, Variant> changed_properties;
        public final List<String> invalidated_properties;

        public PropertiesChanged(String path,
                Map<String, Variant> changed_properties,
                List<String> invalidated_properties) throws DBusException {
            super(path, changed_properties, invalidated_properties);
            this.changed_properties = changed_properties;
            this.invalidated_properties = invalidated_properties;

** File: PropertiesHandler

public class PropertiesHandler implements
DBusSigHandler<dbus.mpris2.PropertiesChangedSignal.PropertiesChanged>  {

    public void handle(PropertiesChanged arg0) {
        // TODO Auto-generated method stub
        System.out.println("SIGNAL RECIEVED!!! AT LAST");


And finally, here is the dbus log relevant to the signal

signal sender=:1.68 -> dest=(null destination) serial=828
path=/org/mpris/MediaPlayer2; interface=org.freedesktop.DBus.Properties;
   string "org.mpris.MediaPlayer2.Player"
   array [
      dict entry(
         string "PlaybackStatus"
         variant             string "Paused"
   array [

If you need to have a look at my full code to get a better understanding of
the situation, it is here:

Another little side question: Why didn't CreateInterface provide me the
interface for the PropertiesChanged signal, but provided it for everything
else than this signal?

Thanks in advance for your precious help,

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the dbus mailing list