AnsweredAssumed Answered

Smack android: Capture stanza users found.

Question asked by Agustín Alcázar on Sep 11, 2017

Hi again!

 

I'm having a problem. When I send a stanza to search new user to open a chat, like that:

<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 log write as response that:

<?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="first" type="text-single" label="Name" />
                <field var="middle" type="text-single" label="Middle Name" />
                <field var="last" type="text-single" label="Family Name" />
                <field var="nick" type="text-single" label="Nickname" />
                <field var="bday" type="text-single" label="Birthday" />
                <field var="ctry" type="text-single" label="Country" />
                <field var="locality" type="text-single" label="City" />
                <field var="email" type="text-single" label="Email" />
                <field var="orgname" type="text-single" label="Organization Name" />
                <field var="orgunit" type="text-single" label="Organization Unit" />
            </reported>
            <item>
                <field var="jid">
                    <value>user1@myserver.com</value>
                </field>
                <field var="fn">
                    <value />
                </field>
                <field var="last">
                    <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>
                <field var="bday">
                    <value />
                </field>
                <field var="ctry">
                    <value />
                </field>
                <field var="locality">
                    <value />
                </field>
                <field var="email">
                    <value />
                </field>
                <field var="orgname">
                    <value />
                </field>
                <field var="orgunit">
                    <value />
                </field>
            </item>
            <item>
                <field var="jid">
                    <value>user2@myserver.com</value>
                </field>
                <field var="fn">
                    <value />
                </field>
                <field var="last">
                    <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>
                <field var="bday">
                    <value />
                </field>
                <field var="ctry">
                    <value />
                </field>
                <field var="locality">
                    <value />
                </field>
                <field var="email">
                    <value />
                </field>
                <field var="orgname">
                    <value />
                </field>
                <field var="orgunit">
                    <value />
                </field>
            </item>
        </x>
    </query>
</iq>

 

But my StanzaListener can't capture it! Can somebody tell me how can I do it to capture it?

 

Thanks in advance!

Outcomes