powered by Jive Software

Presence listening

Hi, i’'m trying to listen for presence status

and with this code when a contact change his status nothing happend…

roster.addRosterListener(

new RosterListener() {

public void rosterModified() {

}

public void presenceChanged(String user) {

// If the presence is unavailable then “null” will be printed,

// which is fine for this example.

System.out.println("Presence changed: " + roster.getPresence(user));

}

});