powered by Jive Software

Not receiving any IQ packet after presence change --- why?

Hi,

I am using the below code to chage a user’spresence (to login) but not receiving any IQ response

Presence presence = new Presence(Presence.Type.available);
presence.setPacketID(“smack_presence”);
presence.setMode(Mode.available);
presence.setType(Type.available);

connection.sendPacket(presence);

PacketCollector collector = connection.createPacketCollector(new PacketIDFilter(“smack_presence”));
IQ response = (IQ) collector.nextResult(SmackConfiguration.getPacketReplyTimeout());
collector.cancel();

I found that response == null — why??

Any suggestions?

Regards,

Samba