I am developing one application in that chatting is one module, for chatting i am using xmpp. when i am sending message i am getting that message delivery status using DeliveryReceiptManager.
DeliveryReceiptManager.getInstanceFor(connection).enableAutoReceipts();
DeliveryReceiptManager.getInstanceFor(connection).addReceiptReceivedListener(new ReceiptReceivedListener()
{
@Override
public void onReceiptReceived(String arg0, String arg1, String arg2)
{
Log.v("app", arg0 + ", " + arg1 + ", " + arg2);
}
});
But i need to show that message is user READ or NOT like whatsApp blue tickmark, Can any one help me i am struck here. how to implement this message read concept.
Thanks in advance.
You need to implement displayed when message is seen, this is basic why how messaging apps implements typing, sent, delivered and seen status
http://xmpp.org/extensions/xep-0022.html#sect-idp643808
Create a message with different attributes which indicate its a read receipt, which shall be sent when receiver reads the message. At the sender's end when you receive a message with read receipt attribute, then mark the message as read, as two blue ticks.
Here status_id=101, I have used to send read receipt, which shall identify it at receiver end.
create custom packet extension class
when enters the chat list send message tag with same packet id like this
where mConnection is xmmppConnection object
add packet extension to message object
add this extension provider to ProviderManager before connecting to server
create packetListener class to receive read receipt from receiver
finally add listener to your xmpp connection object it works successfully