Skip to content Skip to sidebar Skip to footer

How To Retrieve One To One Chat History From Openfire Using Asmack Android

Please can anyone show me the exact code for retrieving a chat history from openfire server to android client application using asmack library and XMPP protocol? In my openfire ser

Solution 1:

public class XMPPManager implements PacketListener {
........

   void connect(){
   //Init connection configuration
       ......
   XMPPTCPConnection xmppTCPConnection = new XMPPTCPConnection(connectionBuilder.build());
   xmppTCPConnection .connect();
   xmppTCPConnection.addSyncStanzaListener(this, null);
 }

 @Override
 public void processStanza(Stanza packet) {
   //Log.d("Log","Body - " + message.getBody());
 }
}

Post a Comment for "How To Retrieve One To One Chat History From Openfire Using Asmack Android"