AnsweredAssumed Answered

REALLY NEED HELP. Process Message not called.

Question asked by Gustavo on May 20, 2016
Latest reply on May 22, 2016 by Guus der Kinderen

I really need help, i have tried all the alternativas but i cant found the error.

I create a ChatManagerListener to listen for incoming messages, its works ok, but, when i create a chat, the smack is creating two different threads.

 

My code:

manager = ChatManager.getInstanceFor(MyXMPP.getConnection());

        manager.addChatListener(new ChatManagerListener() {

            @Override

            public void chatCreated(Chat chat, boolean createdLocally) {

                if(!createdLocally) {

                    chat.addMessageListener(new MyMessageListener());

                }

            }

        });

 

 

Creating a chat:

chat = manager.createChat(user, new MyMessageListener)

 

;

Outcomes