Question

I am working on a chat application using smack api in android. I am succeeded in chatting with one user. But I want to display the chat window of same user with previous chats each time like skype or whtas app so user can see his/her previous chats. How to achieve this? What should I do. . crate database or what?? I am using Openfire server. Please give me a proper solution to achieve this. Thanks in advance!!!

Was it helpful?

Solution

You'll have to store the data somewhere, and the most logical place is a database. For Android apps, you can use a local SQLite database as this is probably a non-relevant data to be stored in a central data base, so in a local database should be enough. Each time you reopen your window, simply query the last lines and place it once you open your window.

You might want to have a look here.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top