3
votes

I am developing an android chat client app and I'm using asmack for XMPP implementation.
I was able to make connection to my XMPP server. I need to send chat messages to specific node to which I'm subscribed.
I use the following code to fetch messages

PubSubManager mgr = new PubSubManager(con);
LeafNode node = mgr.getNode("mynode");
node.subscribe(jid) 
Collection<? extends Item> items = node.getItems();

How can I send message/chat to this node?

1

1 Answers

0
votes

Use either

node.send();

or

node.publish();

You can find examples in the documentation.