powered by Jive Software

Troubles in presence packets

Hello guys.

I’'m having a problem in presence packets.

I implement inside a thread a rosterListener in that manner:

public Roster objRoster;

public synchronized void run()

{

RosterListener objRosterListener = new rosterListerner();

this.objRoster.addRosterListener(objRosterListener);

}

so, rosterListerner is :

class rosterListerner implements RosterListener{

public void rosterModified() { }

public void presenceChanged(String user) {

UpdateStatus(user);

}

When i receive a presence packet of that type (a account in a transport):

Andre Natal (Busy)dnd

The presenceChanged is fired , but, when i receive a packet of that type:

available1

available1

From a normal jabber account, without the element the presenceChanged is not fired.

Anyone knows what I need to do ?

Should I need to set anything in roster object before implement the listener ?

The RosterListener will be fired only if the presence that you receive belongs to a user that is in your roster. It seems from the XML that you sent that al182@amessage.ch is not part of your roster. Could you check if this is your case?

Regards,

– Gato

Yes, certainly …

Could be a problem in server ?

Guys …

it was a server problem … the server that i´m using, wouldn´t working as expected with smack.

Using the same account with exodus and smack at amessage.ch, the new account is in roster with exodus and dont´t with smack.

With jabber.com , it is in roster in both.

Strange … perhaps some mistake between the server conf …