I am using Socket.io for sends and receives messages. I want to store the Chatting history among the users.
What is the best possible way to maintain the chat history and any snippets will be of great help.
I am using Socket.io for sends and receives messages. I want to store the Chatting history among the users.
What is the best possible way to maintain the chat history and any snippets will be of great help.
You can store it in local database link SQLite or Android Room.
You can follow this reference link for integrating Android Room : https://developer.android.com/topic/libraries/architecture/adding-components.html
Use this reference link for SQLite : https://developer.android.com/training/data-storage/sqlite.html
Thanks.
You can either write to a file and load from their when required. Or the other way around would be to use SQLite database to store the messages on the individual device.