PacketExtensionFilter

Hi all,

Iam trying to filter packets with chatstates ( user is composing or paused …) So i used

PacketFilter filter1 = new MessageTypeFilter(Message.Type.chat);

PacketExtensionFilter pf = new PacketExtensionFilter(“x” , “jabber:x:event”);

OrFilter or = new OrFilter(filter , pf);
chatConnection.addPacketListener(listener, or);

But it is not working properly i.e iam receiving packets ( matching the filter “pf”) until the user sends his first message, after that iam not receiving such packets to know whether user is composing or paused.

Is the packetfilter iam using is wrong? If Yes, could anyone please tell me what packetfilter i have to use

Thanks in advance