title: Not able to receive group message using smack
body: <pre><code> var multiUserManager: MultiUserChatManager = MultiUserChatManager.getInstanceFor(constants.obj.connection)
          var multiUserChat: MultiUserChat =multiUserManager.getMultiUserChat(JidCreate.entityBareFrom(roomName))
  
           var a: Resourcepart = Resourcepart.from(PreferenceManager.getDefaultSharedPreferences(applicationContext).getString("j_id", null))
           multiUserChat.join(a)
  
         multiUserChat.addMessageListener { object: MessageListener {
             override fun processMessage(message: Message?) {
                 Log.v("Message is ",message.toString())
                 Log.v("Message from ",message!!.from.toString())
                 Log.v("Message is ",message.getBody())
                 Log.v("Message subject ",message.getSubject())
                 Log.v("Message is ",message.body)
             }
  
         } }
  </code></pre>
  
  <p>and I have try this also.</p>
  
  <pre><code> multiUserChat.addMessageListener { GroupChatListener() }
  
   class GroupChatListener : StanzaListener {
      override fun processStanza(packet: Stanza?) {
  
          Log.v("Packet is ",packet.toString())
          Log.v("From",packet!!.from.toString())
          Log.v("Stanza id ",packet.stanzaId)
      }
  </code></pre>
  
  <p>I am not able to receive the message when anyone sent on the server but i am able to send the message. </p>
  
  <p>edit:</p>
  
  <p>This is the output I am getting when I press join button. I am not getting any error in the logcat.</p>
  
  <pre><code> 04-25 22:31:45.460 13376-13376/com.example.itstym.smackchat D/on click: fbjg
  04-25 22:31:45.460 13376-13376/com.example.itstym.smackchat D/Room name: room1
  04-25 22:31:45.460 13376-13376/com.example.itstym.smackchat D/Nick name: ank
  04-25 22:31:45.479 13376-13376/com.example.itstym.smackchat V/Multiuser chat: MUC: room1@conference.replica3377.cloudapp.net(user1@replica3377.cloudapp.net/1540794269789260263741678)
  04-25 22:31:45.481 13376-16060/com.example.itstym.smackchat D/SMACK: SENT (0): &lt;iq to='conference.replica3377.cloudapp.net' id='X2GPV-38' type='get'&gt;&lt;query xmlns='http://jabber.org/protocol/disco#info'&gt;&lt;/query&gt;&lt;/iq&gt;
  04-25 22:31:45.482 13376-16060/com.example.itstym.smackchat D/SMACK: SENT (0): &lt;r xmlns='urn:xmpp:sm:3'/&gt;
  04-25 22:31:47.538 13376-16061/com.example.itstym.smackchat D/SMACK: RECV (0): &lt;a h='15' xmlns='urn:xmpp:sm:3'/&gt;&lt;iq xml:lang='en' to='user1@replica3377.cloudapp.net/1540794269789260263741678' from='conference.replica3377.cloudapp.net' type='result' id='X2GPV-38'&gt;&lt;query xmlns='http://jabber.org/protocol/disco#info'&gt;&lt;identity name='Chatrooms' type='text' category='conference'/&gt;&lt;feature var='http://jabber.org/protocol/disco#info'/&gt;&lt;feature var='http://jabber.org/protocol/disco#items'/&gt;&lt;feature var='jabber:iq:register'/&gt;&lt;feature var='http://jabber.org/protocol/muc'/&gt;&lt;feature var='vcard-temp'/&gt;&lt;feature var='urn:xmpp:mucsub:0'/&gt;&lt;feature var='http://jabber.org/protocol/muc#unique'/&gt;&lt;feature var='http://jabber.org/protocol/rsm'/&gt;&lt;feature var='urn:xmpp:mam:tmp'/&gt;&lt;feature var='urn:xmpp:mam:0'/&gt;&lt;feature var='urn:xmpp:mam:1'/&gt;&lt;x type='result' xmlns='jabber:x:data'&gt;&lt;field var='FORM_TYPE' type='hidden'&gt;&lt;value&gt;http://jabber.org/network/serverinfo&lt;/value&gt;&lt;/field&gt;&lt;/x&gt;&lt;/query&gt;&lt;/iq&gt;&lt;r xmlns='urn:xmpp:sm:3'/&gt;
  04-25 22:31:47.541 13376-16060/com.example.itstym.smackchat D/SMACK: SENT (0): &lt;a xmlns='urn:xmpp:sm:3' h='16'/&gt;&lt;presence to='room1@conference.replica3377.cloudapp.net/ank' id='X2GPV-37'&gt;&lt;x xmlns='http://jabber.org/protocol/muc'&gt;&lt;/x&gt;&lt;c xmlns='http://jabber.org/protocol/caps' hash='sha-1' node='http://www.igniterealtime.org/projects/smack' ver='os2Kusj3WEOivn5n4iFr/ZEO8ls='/&gt;&lt;/presence&gt;
  04-25 22:31:47.823 13376-16061/com.example.itstym.smackchat D/SMACK: RECV (0): &lt;presence xml:lang='en' to='user1@replica3377.cloudapp.net/1540794269789260263741678' from='room1@conference.replica3377.cloudapp.net/an' id='Kd5p0-48'&gt;&lt;c xmlns='http://jabber.org/protocol/caps' hash='sha-1' node='http://www.igniterealtime.org/projects/smack' ver='os2Kusj3WEOivn5n4iFr/ZEO8ls='/&gt;&lt;x xmlns='http://jabber.org/protocol/muc#user'&gt;&lt;item role='participant' affiliation='none'/&gt;&lt;/x&gt;&lt;/presence&gt;
  04-25 22:31:47.835 13376-16061/com.example.itstym.smackchat D/SMACK: RECV (0): &lt;r xmlns='urn:xmpp:sm:3'/&gt;&lt;presence xml:lang='en' to='user1@replica3377.cloudapp.net/1540794269789260263741678' from='room1@conference.replica3377.cloudapp.net/ank' id='X2GPV-37'&gt;&lt;c xmlns='http://jabber.org/protocol/caps' hash='sha-1' node='http://www.igniterealtime.org/projects/smack' ver='os2Kusj3WEOivn5n4iFr/ZEO8ls='/&gt;&lt;x xmlns='http://jabber.org/protocol/muc#user'&gt;&lt;item jid='user1@replica3377.cloudapp.net/1540794269789260263741678' role='participant' affiliation='none'/&gt;&lt;status code='110'/&gt;&lt;/x&gt;&lt;/presence&gt;&lt;message xml:lang='en' to='user1@replica3377.cloudapp.net/1540794269789260263741678' from='room1@conference.replica3377.cloudapp.net/user1' type='groupchat' id='54f75761-b5cd-4955-8d32-5609e89a2417'&gt;&lt;x xmlns='jabber:x:event'&gt;&lt;composing/&gt;&lt;/x&gt;&lt;delay from='room1@conference.replica3377.cloudapp.net' stamp='2017-04-21T11:52:40.966514Z' xmlns='urn:xmpp:delay'/&gt;&lt;body&gt;hey&lt;/body&gt;&lt;/message&gt;&lt;message xml:lang='en' to='user1@replica3377.cloudapp.net/1540794269789260263741678' from='room1@conference.replica3377.cloudapp.net/user1' type='groupchat' id='1492776073223:msg'&gt;&lt;active xmlns='http://jabber.org/protocol/chatstates'/&gt;&lt;delay from='room1@conference.replica3377.cloudapp.net' stamp='2017-04-21T12:01:13.896472Z' xmlns='urn:xmpp:delay'/&gt;&lt;body&gt;asd&amp;apos;&lt;/body&gt;&lt;/message&gt;
  04-25 22:31:47.835 13376-16060/com.example.itstym.smackchat D/SMACK: SENT (0): &lt;a xmlns='urn:xmpp:sm:3' h='17'/&gt;
  04-25 22:31:47.836 13376-13376/com.example.itstym.smackchat V/Joined response: kotlin.Unit
  04-25 22:31:47.836 13376-13376/com.example.itstym.smackchat V/Joined: true
  04-25 22:31:47.836 13376-13376/com.example.itstym.smackchat I/Choreographer: Skipped 142 frames!  The application may be doing too much work on its main thread.
  04-25 22:31:47.841 13376-16061/com.example.itstym.smackchat D/SMACK: RECV (0): &lt;message xml:lang='en' to='user1@replica3377.cloudapp.net/1540794269789260263741678' from='room1@conference.replica3377.cloudapp.net/ankur' type='groupchat' id='05333f72-0ffc-49ba-8180-23c3b00b5d31'&gt;&lt;x xmlns='jabber:x:event'&gt;&lt;composing/&gt;&lt;/x&gt;&lt;delay from='room1@conference.replica3377.cloudapp.net' stamp='2017-04-24T11:02:35.386083Z' xmlns='urn:xmpp:delay'/&gt;&lt;body&gt;jfdgsdk&lt;/body&gt;&lt;/message&gt;&lt;message xml:lang='en' to='user1@replica3377.cloudapp.net/1540794269789260263741678' from='room1@conference.replica3377.cloudapp.net/wefa' type='groupchat' id='e0e5cf9a-a363-4f05-a8cf-b2d1016a99d2'&gt;&lt;x xmlns='jabber:x:event'&gt;&lt;composing/&gt;&lt;/x&gt;&lt;delay from='room1@conference.replica3377.cloudapp.net' stamp='2017-04-24T11:25:57.859462Z' xmlns='urn:xmpp:delay'/&gt;&lt;body&gt;dgdfgsdfgsg&lt;/body&gt;&lt;/message&gt;&lt;message xml:lang='en' to='user1@replica3377.cloudapp.net/1540794269789260263741678' from='room1@conference.replica3377.cloudapp.net/abv' type='groupchat' id='fr3u8-51'&gt;&lt;delay from='room1@conference.replica3377.cloudapp.net' stamp='2017-04-24T11:28:05.832722Z' xmlns='urn:xmpp:delay'/&gt;&lt;body&gt;hi&lt;/body&gt;&lt;/message&gt;&lt;message xml:lang='en' to='user1@replica3377.cloudapp.net/1540794269789260263741678' from='room1@conference.replica3377.cloudapp.net/wefa' type='groupchat' id='6259ccab-5235-4367-8b57-f03f27ec8c9a'&gt;&lt;x xmlns='jabber:x:event'&gt;&lt;composing/&gt;&lt;/x&gt;&lt;delay from='room1@conference.replica3377
  04-25 22:31:47.873 13376-16061/com.example.itstym.smackchat D/SMACK: RECV (0): .cloudapp.net' stamp='2017-04-24T11:28:24.801581Z' xmlns='urn:xmpp:delay'/&gt;&lt;body&gt;welcome abv&lt;/body&gt;&lt;/message&gt;&lt;message to='user1@replica3377.cloudapp.net/1540794269789260263741678' from='room1@conference.replica3377.cloudapp.net' type='groupchat'&gt;&lt;subject/&gt;&lt;/message&gt;
  04-25 22:31:47.881 13376-16096/com.example.itstym.smackchat W/MultiUserChat: Message subject not changed by a full JID: room1@conference.replica3377.cloudapp.net
  04-25 22:31:48.030 13376-16061/com.example.itstym.smackchat D/SMACK: RECV (0): &lt;r xmlns='urn:xmpp:sm:3'/&gt;
  04-25 22:31:48.031 13376-16060/com.example.itstym.smackchat D/SMACK: SENT (0): &lt;a xmlns='urn:xmpp:sm:3' h='25'/&gt;
  </code></pre>
  
  <p><strong>edit 2:</strong></p>
  
  <pre><code>multiUserChat?.addMessageListener {
                      Log.v("listener","yup")
                      MessageListener { message -&gt;
                          Log.v("Message is complete ",message.toString())
                          Log.v("Message from ",message?.from.toString())
                          Log.v("Message is body",message?.getBody())
                          Log.v("Message subject ",message?.getSubject())
                          Log.v("Message body ",message?.body)
                      }
                  }
  </code></pre>
  
  <p>Whenever someone send me the message                         Log.v("listener","yup") called. But don't go inside messagelistener. 
  I have read the log output and find them I am getting the msg in the form of xml. </p>