I have received data from an XMPP server, as a result of a search(IQ). The whole story is related here. This is the code:
UserSearchManager usm = new UserSearchManager(ChatList.connection);
Form searchForm = null;
try {
searchForm = usm.getSearchForm("search.webserv.xxx.com");
} catch (XMPPException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
Form answerForm = searchForm.createAnswerForm();
answerForm.setAnswer("Username", true);
answerForm.setAnswer("search", "android");
try {
ReportedData data =
usm.getSearchResults(answerForm, "search.webserv.xxx.com");
} catch (XMPPException e) {
e.printStackTrace();
}
So the results are contained within the "data" variable, but I don't know how to access it. There are almost no answeres out there on google, I've been at this problem (and the whole xmpp thing) for a while now. Can a wiser man than me please tell me how to search and add someone to my xmpp chat contact list?