How to get messages from table (ofmessagearchive)?


I have installed Monitoring service plugin to enable message archiving.And the messages are stored in table named ofmessagearchive sucessfully.

Now,I want to kown how to get message at my andriod app.Is there any API or some advice to help me?

thanks a lot!

From the plugin’s documentation:

As of version 1.3 this plugin combines Stefan Reuter’s Open Archive plugin to provide XEP-0136 automated archiving and message retrieval for one-to-one and MUC chat. Support for preferences and manual archiving will follow later.

So, you can use XEP-0136: Message Archiving in your android app to retrieve saved history.

Thanks for your answer.But I don’t exactly understand.

For an example,there is an conversation between A and B.They haved a chat few days ago.

Now,A is want to chat with B again.When A opens the conversation layout, A wants to see chat history,how to load old messages?

In my opinion, I need to visit the ofmessagearchive table from database.Then pick up the messages between A and B.

Is that right? I want to know is there any good method to solve the problem.Thanks again.

Well, can’t answer that. Not a developer myself.

I don’t know how to use XEP-0136 to retrieve the messages. But if you just want to see old messages as described in given example. Then you can use Spark client, It has chat conversation option. It will visible only with those user whom you ever did chat. You can see one month old/1 year old/Show all on the page.