How can i store chat history in Android
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 t开发者_JAVA技巧he chat by clicking a button.
What is the best possible way to maintain the chat history and any snippets will be of great help.
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.
精彩评论