Smack 4.1.2 - 无法解析XEP-0191的结果IQ

时间:2015-07-08 04:55:57

标签: android xmpp smack

我已使用以下代码实现了XEP-0191(阻止命令) https://github.com/kontalk/client-common-java/blob/master/src/main/java/org/kont alk/client/BlockingCommand.java

问题,我面临的是'在使用节'

请求阻止列表'
<iq type='get' id='blocklist1'>
  <blocklist xmlns='urn:xmpp:blocking'/>
</iq>

我能够看到XMPP结果IQ(使用SmackConfiguration.DEBUG_ENABLED = TRUE)

RECV (0): <iq from='123xxx@xxx.com' to='123xxx@xxx.com/res' id='-9' type='result'><blocklist xmlns='urn:xmpp:blocking'><item jid='92345607xxx@xxx.com/res'/><item jid='923445xxxx@xxx.com'/></blocklist></iq>

但是我的IQ Listener忽略了上面的Packet。

虽然我也包括以下几行

ProviderManager.addIQProvider(BlockingCommand.BLOCK, BlockingCommand.NAMESPACE, new BlockingCommand.Provider());  
ProviderManager.addIQProvider(BlockingCommand.UNBLOCK, BlockingCommand.NAMESPACE, new BlockingCommand.Provider());  
ProviderManager.addIQProvider(BlockingCommand.BLOCKLIST, BlockingCommand.NAMESPACE, new BlockingCommand.Provider());  
ProviderManager.addIQProvider(BlockingCommand.UNALLOW, BlockingCommand.NAMESPACE, new BlockingCommand.Provider()); 

0 个答案:

没有答案