i am creating pubsub sample in android using Asmack library , m totally new to asmack but i succesfully installed and configured the openfire server
- from device 1 , i have created one node name **mytest/position **over the server and publishing few content over it.
- from device 2 , with a new jid , i have register listener for subsrcibtion and subscribed to **mytest/position **node.
- from device 1 , i am keep on publishing some information over **mytest/position **node so that other subscribers can get that.
- but unfortunately i am not be get any published information on device 2 , i have used listener as follows
code is taken from http://www.igniterealtime.org/builds/smack/docs/latest/documentation/extensions/ pubsub.html#retrieve
// Create a pubsub manager using an existing Connection
PubSubManager mgr = new PubSubManager(con);
// Get the node
LeafNode node = mgr.getNode(“mytest/position”);
node.addItemEventListener(new ItemEventCoordinator());
node.subscribe(myJid);
class ItemEventCoordinator implements ItemEventListener
{
@Override
public void handlePublishedItems(ItemPublishEvent items)
{
System.out.println("Item count: " + items.getItems().size());
System.out.println(items);
}
}
there is listner then why its not being called ? i have test the subscribers over psi xml console where i can see the data sent my publisher but not in asmack , am i doing something wrong ?