How to get Openfire chat history on Android device with aSmack?

后端 未结 3 868
闹比i
闹比i 2020-12-17 20:02

I am developing a chatting application, where user will chats with one of the domain expert\'s group member. user uses my android app and domain expert uses spark web for ch

相关标签:
3条回答
  • 2020-12-17 20:12

    I added Monitoring service Plugin to openfire, which created some additional tables to store chat conversation details between any 2 accounts. Monitoring service also gives you data base query statics. From admin panel data base statics, I am able to get in which tables, which columns this chat details got stored. Also required queries. using the above info, My back end team has written web services to get required info. This is the way I implemented.

    0 讨论(0)
  • 2020-12-17 20:22

    If you are using MUC (XEP-45) then you can request the discussion history when entering a MUC. See XEP-45 7.2.14 Discussion History. When using (a)Smack, this mean that you have to use MultiUserChat.join(String nickname, String password, DiscussionHistory history, long timeout) to get the History.

    0 讨论(0)
  • 2020-12-17 20:23

    You can get groupchat history by using following code:

    DiscussionHistory history = new DiscussionHistory();
    history.setMaxStanzas(0);
    
    
    multiUserChat.join("username", "password", history, SmackConfiguration.getPacketReplyTimeout());
    
    0 讨论(0)
提交回复
热议问题