I am new to XMPP protocol, i tried to find good examples of sending and receiving IQ packets in XMPP ANDROID, but i failed, I tried using the following chunk of code but it did not help.
CODE:
final IQ iq = new IQ() {
public String getChildElementXML() {
return "<iq type='get' from='9f30dacb@web.vlivetech.com/9f30dacb' id='1'> <query xmlns='http://jabber.org/protocol/disco#info'/></iq>"; // here is your query
//"<iq type='get' from='9f30dacb@web.vlivetech.com/9f30dacb' id='1'> <query xmlns='http://jabber.org/protocol/disco#info'/></iq>";
}};
// set the type
iq.setType(IQ.Type.GET);
// send the request
connection.sendPacket(iq);
I tried using this code, but it did not send any message to server. can somebody help me with right piece of code? so that i can send my IQ's to the server and receive the response