powered by Jive Software

How do I know if a chat message is recieved by the server?

I’m creating an Instant Messenger application for Android using XMPP. How can I determine whether the messages that I send are received by the server? Or how do I determine if the message has been sent?

Is openfire supports this ?

1 Like

There is no confirmation from the server that the message has been received or that the message has been sent to the recipient. You probably want something like XEP-0184 Message Delivery Reciepts http://www.xmpp.org/extensions/xep-0184.html

This is a client side feature. Smack library supports that (SMACK-331). So you can develope a client based on Smack and hook into this feature. Then you client will receive confirmations when a message is received by a recipient (not by a server).

Hello Wroot ,

Is this working for also offine message delivery ?

Can’t say for sure. At least they don’t mention it in the list when this protocol could fail. The message has some special attribute asking for the acknowledgement, and this attribute should be preserved in the offline storage. So when recipient goes online, he should receive the original message and then be able to send ack packet back.

wroot, this is correct.

rajesh: What you are actually looking for is XEP-0198. But it’s not implemented in Openfire.

The BOSH technique, however, has a similar approach. It sends “ack” responses back to the client.

So you at least know, if a BOSH request has been received by the server.