/** * Returns the first value found in the ReportedData.Row. * * @param row the ReportedData.Row. * @param key the specified key in the ReportedData.Row. * @return the first value found in the ReportedData.Row */ public String getFirstValue(ReportedData.Row row, String key) { List<CharSequence> values = row.getValues( key ); return values == null || values.isEmpty() ? null : values.get( 0 ).toString(); }
Iterator iterator = row.getValues("jid");
List<ReportedData.Row> rows = results.getRows(); for (ReportedData.Row row : rows) { Log.d("***", "row: " + row.getValues("Username").toString());
UserSearchManager usm= new UserSearchManager(xmpp.getConnection()); Form searchForm = usm.getSearchForm("search." +xmpp.getConnection().getServiceName()); Form answerForm = searchForm.createAnswerForm(); answerForm.setAnswer("Username", true); answerForm.setAnswer("search", userName); ReportedData data = usm .getSearchResults(answerForm, "search." + xmpp.getConnection().getServiceName()); if (data.getRows() != null) { for (ReportedData.Row row: data.getRows()) { for (String jid:row.getValues("jid")) { System.out.println(jid); } } }