0 Replies Latest reply on Sep 17, 2017 11:46 PM by Karthik Thunga

    Smack 4.2.0 OutgoingChatMessageListener is not getting any call

    Karthik Thunga

      I am using smack 4.2.0 latest version, here `IncomingChatMessageListener` is working fine but `OutgoingChatMessageListener` is not getting called when I send the message. Can any one suggest me whats the issue?

      My code is below

       

       

          ChatManager chatManager = ChatManager.getInstanceFor(mXMPPConn);

          EntityBareJid jid = JidCreate.entityBareFrom(mStrJabberID);

          Chat chat = chatManager.chatWith(jid);

          chatManager.addOutgoingListener(new OutgoingChatMessageListener() {

             @Override

             public void newOutgoingMessage(EntityBareJid to, Message message, Chat chat)

             {

                System.out.format("OUTGOING: %s.\n", message);

             }

          });

       

       

          chat.send(strMsg);