Send and Receive IQ ASMACK Android XMPP -


i new xmpp protocol, tried find examples of sending , receiving iq packets in xmpp android, failed, tried using following chunk of code 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 query     //"<iq type='get' from='9f30dacb@web.vlivetech.com/9f30dacb' id='1'> <query xmlns='http://jabber.org/protocol/disco#info'/></iq>";      }};     // set type iq.settype(iq.type.get); // send request connection.sendpacket(iq); 

i tried using code, did not send message server. can me right piece of code? can send iq's server , receive response

haven't tested yet, try

    iq iq = new iq();     iq.setto("destination@server");     iq.setfrom("9f30dacb@web.vlivetech.com/9f30dacb");     iq.settype(iq.type.get);             iq.setpacketid("1");     connection.sendpacket(iq); 

Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -