How to retrieve one to one chat history from Openfire using asmack android

前端 未结 1 1108
清歌不尽
清歌不尽 2021-01-02 17:15

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 openf

相关标签:
1条回答
  • 2021-01-02 17:48
    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());
     }
    }
    
    0 讨论(0)
提交回复
热议问题