I’'m trying to use the SMACK jar to search for a user in a directory (search by first/last/ name or email or combination).
I tried to use the UserSearchManager but failed.
Is that the right way to do a user search? Can you provide me with a code sample? I tried the code in the UserSearchManager API but failed.
Sample from UserSearchManager API:
XMPPConnection con = new XMPPConnection(“jabber.org”);
UserSearchManager search = new UserSearchManager(con, “users.jabber.org”);
Form searchForm = search.getSearchForm();
Form answerForm = searchForm.createAnswerForm();
ReportedData data = search.getSearchResults(answerForm);
Is there another way to do that search?