AnsweredAssumed Answered

Not able to receive the message.

Question asked by Ankur on May 3, 2017

Code for receiving message:

 

var localChatManager: ChatManager = ChatManager.getInstanceFor(connection)

localChatManager.addIncomingListener { from, message, chat ->
   Log.v("from ",from.toString())

//other business logic

  }

 

Code for sending message :

 

var localChatManager: ChatManager = ChatManager.getInstanceFor(connection)

var chat: Chat = localChatManager.chatWith(contactJid)

var message: Message = Message()

message.setBody(msg_text.text.toString())

chat.send(message)

Outcomes