Hi guys, IÂ´m brazilian. How can I save and get messages of database with Chat (class Chat)? I use MultiUserChat, but now I need use Chat to have a conversation with only two users. Please, help me. Send some codes for example. Thank you!!!
I’'m not quite sure what you mean by, “get message of database with Chat” but if you are wanting to allow to people to chat with one another then take a look at the documentation regarding it.
Basically though, you’‘re going to have to attach a PacketListener to your connection to listen out for CHAT packets. When each packet comes in, you’'ll have to take a look at it and then route it accordingly
Sorry, I forgot to mention, I use the server Wildfire. I need the way to save and retrieve the exchanged messages in a Chat, into database of Wildfire. As same as happened with MultiUserChat, the messages are saved in the table of database “mucConversationLog”, and I retrieve the saved messages automatically
when I join in the room.
Sorry for english!
One-to-One chat does not have a history mechanism.
You can save them off with your client and read them back later. Many clients have history/logging functionality.
if JEP-0136 Message Archiving matches what you are looking for than you may find an open source solution here: http://zeank.in-berlin.de/
It is not tested with Wildfire and Smack will probably not support this feature either.