How can I sent a custom IQ Stanza using smack 4.2 in android. I tried to convert the following stanza in smack IQ but unsuccessful
<iq type="set" to="mygrp-2bf4a6cf@muclight.mydmain.org.com" from="+6500000000@mydmain.org.com" id="modarchive-22317496CE4C">
<query
xmlns="urn:xmpp:mam:1" queryid="queryId-1FF4671B-183F-4CEA-BF84-CAAA5BA3293A"/> </iq>
My smack Code
public IQ getCustomStanza(String group , String user){
IQ miQ= new IQ ("query") {
@Override
protected IQChildElementXmlStringBuilder getIQChildElementBuilder(IQChildElementXmlStringBuilder xml) {
return (IQChildElementXmlStringBuilder) xml.append ("<query xmlns= urn:xmpp:mam:1 queryid=queryId-1FF4671B-183F-4CEA-BF84-CAAA5BA3293A/>");
}
};
try {
miQ.setFrom (JidCreate.bareFrom (user));
miQ.setType (IQ.Type.set);
miQ.setTo (JidCreate.bareFrom (group));
miQ.setStanzaId ();
} catch (XmppStringprepException e) {
e.printStackTrace ( );
}
return miQ;
}
but getting null