I am trying to use Smack API to provide chat functionality between my two different projects. Both side I am able to send message. But due to some problem I am not able to receive message on both the side. I think my process-message function is not working properly. How to make it work properly.

My XMPPConnection.DEBUG_ENABLED = true; is working properly, I can see a message is sent and received properly via Google talk. Only I can process the received message..thank you in advance...

public void processMessage(Chat chat, Message message) {    
        if (message.getType() == Message.Type.chat){
            System.out.println(chat.getParticipant() + " says:" + message.getBody());
            String cmdmsg = message.getBody();

0 Answers