Hi
I’m trying to establish a simple xmpp group chat on Android using the asmack xmpp library. And basically everything is working, except: UNAVAILABLE presences, i.e., when a user leaves a chat room, seem to be ignored in most cases. The strange part is, sometimes it works, but very rarely.
Presences from users entering the group chat are fine, so are messages. Both my local Openfire server as well as a xmpp client (Instantbird) tell me that there is a UNAVAILABLE presence when user leaves. Only my stuff has troubles.
Here’s the relevant snippet of my code.
…
this.listener = new PacketListener() {
@Override
public void processPacket(Packet packet) {
if (packet instanceof Presence)
handlePresence((Presence)packet);
else if (packet instanceof Message)
handleMessage((Message)packet);
}
};
this.xmppClient.getXMPPConnection().addPacketListener(
this.listener,
new OrFilter(new PacketTypeFilter(Presence.class),
new PacketTypeFilter(Message.class)));
…
I appriciate any hint in that! Thanks!