【问题标题】:List of all pub-sub items for a particular user in Smack API?Smack API中特定用户的所有发布-订阅项目列表?
【发布时间】:2016-09-12 08:16:10
【问题描述】:

我正在使用 PUBSUB 协议使用链接创建节点 http://download.igniterealtime.org/smack/docs/latest/documentation/extensions/pubsub.html

谁能帮我获取为特定用户创建的订阅项目列表?这是我的代码:

PubSubManager manager = PubSubManager.getInstance(connection);
LeafNode leaf = mgr.createNode("testNode");
ConfigureForm form = new ConfigureForm(FormType.submit);
form.setAccessModel(AccessModel.open);
form.setDeliverPayloads(false);
form.setNotifyRetract(true);
form.setPersistentItems(true);
form.setPublishModel(PublishModel.open);
leaf.sendConfigurationForm(form);

我愿意做这样的事情

manager.getAllListofSubscriedItems(){
// TO DO Implementation here, **Need some idea here**
}

【问题讨论】:

标签: android xmpp openfire smack


【解决方案1】:

您可以使用PubSubManager 来发现节点树。 使用

  • discoverNodes
  • getAffiliations()

http://download.igniterealtime.org/smack/docs/latest/javadoc/

【讨论】:

  • 嗨 Antoniossss,我收到以下错误。 W/AbstractXMPPConnection: Connection XMPPTCPConnection[user0@myserver.local/5pqgr3nw88] (0) closed with error org.jivesoftware.smack.SmackException: Invalid affililation
猜你喜欢
  • 2012-08-05
  • 1970-01-01
  • 1970-01-01
  • 2020-10-11
  • 1970-01-01
  • 2020-03-03
  • 1970-01-01
  • 2015-09-05
  • 2018-06-05
相关资源
最近更新 更多