Can someone give me an example code for recieving chat messages? I have written a code for sending message. The main problem I face is, I am able to recieve a message only when I initiate a chat with the sender who sends the message.
The structure of packetlistener and packetcollector etc seem to be pretty confusing for a newbie like me.
Any help would be appreciated