powered by Jive Software

Example idea: Receiving an initial message

The documentation only shows how users can initiate a chat themselves. It think it would be nice to add an example of how to start a chat session after receiving an chat message from a buddy, since that is rather different from initiating a chat.

Something like this:

PacketTypeFilter packetTypeFilter = new PacketTypeFilter(org.jivesoftware.smack.packet.Message.class);

connection.addPacketListener(SomePacketListener, packetTypeFilter);

Where the PacketListener takes care of checking for ThreadID’'s etc.