How to add "like" reaction to chat bubble with Android+Smack+XMPP

614 Views Asked by At

In one of my chat app, I would like implement functionality to assign "like" reaction to chat bubble which needs to notify other user like below using

Like Reaction Image

Is it possible to achieve this without any XMPP server side coding? How to pass custom tag using smack and push message?

1

There are 1 best solutions below

0
On

Yes, this can be achieved without coding in server side upto ejabberd 16.06. Construct a Message tag for example

<message type="chat"  to="[email protected]" id="aad0a" msgtype="emoji">
<body>Emoji Icon</body>
<active xmlns="http://jabber.org/protocol/chatstates"/>
<request xmlns="urn:xmpp:receipts"/>
</message>

When you send emoji, add a custom tag msgtype="emoji" and add emoji link to inside the body and validate receiver end.