How can I fetch chat log or chat history from Openfire server using Smack library into an Android application?
As far as I know, there is no storing of chat history in Openfire. You can only get offline messages sent by user (when they connect next time for example), but if you want to store the messages you can implement it yourself directly on the XMPP server (personally I did it using mongodb - it works great!).
But then, maybe I missed something in Openfire...
Openfire server can surely save chat histories. To turn it on, you should go to Server/Server Settings/Message Audit Policy and select Enable Message Auditing. As you can see there, messages will be held under the /.../openfire/logs folder in some kind of XML format. You can parse this XML and get your messages very easily
As far as I know, there is no storing of chat history in Openfire. You can only get offline messages sent by user (when they connect next time for example), but if you want to store the messages you can implement it yourself directly on the XMPP server (personally I did it using mongodb - it works great!).
But then, maybe I missed something in Openfire...
© 2022 - 2024 — McMap. All rights reserved.