How to get offline message in PubSub? Using the Smack library. after searching I found an answer which looks like this:
// Create a pubsub manager using an existing XMPPConnection
PubSubManager mgr = PubSubManager.getInstanceFor(con);
// Get the node
LeafNode node = mgr.getNode("testNode");
List<? extends Item> items = node.getItems(100);
But node.getItems(100)
returns last 100 messages, which can be online and offline too.
1) how to keep track of online and offline message in pubsub using smack?
2) is it possible to get unread message count in pubsub using smack? if yes then how to achieve it?
3) how to know that who(publisher) send this message in a node?
I just went through the documentation of Smack and PubSub from here and here but didn't find the solutions related to my queries. So can anyone help me to solve this?