about offline message

Clarence Pan
Added almost 4 years ago

I'm using jaxmpp 2.x on android development. And using the method as fellow to monitor the message.

But I found that I can't get offline message usually. Can any body tell me why? Thanks a lot.

            new Listener<MessageEvent>() {

                public void handleEvent(MessageEvent be) throws JaxmppException {
                    if (be != null && be.getType() != null) {
                        if (be.getType().equals(MessageModule.MessageReceived)) {


Replies (4)

Added by Wojciech Kapcia TigaseTeam almost 4 years ago

Main question is - do you receive offline messages at all (i.e. are they present in the logs of the client) and only the listener is not fired or they are not sent at all? When do you register listener in your code?


Added by Clarence Pan almost 4 years ago

I register the listener before jaxmpp login. But I found that when I change another server I can receive offline messages normally. My workmate told me the server's settings are the same as the last I used. It is strange. Anyway, do you know any methods offered can get the offline messages by hand?

Added by Wojciech Kapcia TigaseTeam almost 4 years ago

Are you trying the same user? Is it possible there are no offline messages stored (as they were pushed to the previous session)? The reason is that after offline messages being retrieved and delivered to user they are removed from the database and the delivery is triggered by sending initial @presence@. If you want more persistence of messages you can use Archiving of messages and retrieve them at any time.


Added by Clarence Pan almost 4 years ago

Thx very much. The problem has been solve. It was tigas server problem.