我开发了XMPP Smack Android应用程序,但我遇到了问题。当我发送一个节来搜索新用户来打开聊天时,就像那样:
<iq type="set" to="vjud.myserver.com" id="searchUsers">
<query xmlns="jabber:iq:search">
<x xmlns="jabber:x:data" type="submit">
<field type="text-single" var="nick">
<value></value>
</field>
</x>
</query>
</iq>
Smack日志写下这个回复:
<?xml version="1.0" encoding="UTF-8"?>
<iq xml:lang="en" to="server@myserver.com/3462143" from="vjud.myserver.com"
type="result" id="searchUsers">
<query
xmlns="jabber:iq:search">
<x xmlns="jabber:x:data" type="result">
<title>Search Results for vjud.myserver.com</title>
<reported>
<field var="jid" type="text-single" label="Jabber ID" />
<field var="fn" type="text-single" label="Full Name" />
...
<field var="nick" type="text-single" label="Nickname" />
...
<field var="orgunit" type="text-single" label="Organization
Unit" />
</reported>
<item>
<field var="jid">
<value>user1@myserver.com</value>
</field>
...
<field var="first">
<value>test admin 1</value>
</field>
<field var="middle">
<value />
</field>
<field var="nick">
<value>test admin 1</value>
</field>
...
</item>
<item>
<field var="jid">
<value>user2@myserver.com</value>
</field>
...
<field var="first">
<value>test admin 1</value>
</field>
...
<field var="nick">
<value>test admin 1</value>
</field>
<field var="bday">
<value />
</field>
...
<field var="orgunit">
<value />
</field>
</item>
</x>
</query>
</iq>
但我的Xmpp Smack StanzaListener无法捕获它!有人可以告诉我怎样才能抓住它?
提前致谢!