I am working on an XMPP client app that sends and receives IM using ASmack library. I want to store the Chatting history among the users. This history must be persistent until i clear the chat by clicking a button.
What is the best possible way to maintain the chat history and any snippets will be of great help.
You can use the export chat feature to export a copy of the chat history from an individual or group chat. Open the individual or group chat. Tap More options > More > Export chat. Choose whether to export with media or without media.
Launch LINE on your Android, go to its Settings > Chats, and select the feature to backup and restore chat history. Step 2. From here, tap on the option to backup your chats on Google Drive. Also, you can tap on the Google Account section to make sure that LINE is connected to an appropriate account.
Open WhatsApp. Tap More options > Settings > Chats > Chat backup > Back up to Google Drive. Select a backup frequency other than Never. Select the Google account you'd like to back up your chat history to.
A simple Sqlite database comes to mind. You could then save all history of all chats for as long as you need. And selectively erase one chat session and not another.
See : http://developer.android.com/guide/topics/data/data-storage.html#db
And you'll find a lot of easy tutorial to follow along on the interweb.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With