I\'m try to implement a user search on top of my working Smack-API based jabber client.It can create user using:
AccountManager manager = conn.getAccountMana
Apparently what's needed is just to catch the error code 409 in the XMPPException, as createAccount throws exception if user exist.
Easiest way is to log in as the user once, without sending presence. In general, we try to find all of the ways you could answer this question without having the ability to log in as the user, and eliminate them, in order to help prevent spim.
Although you don't actually need the functionality you requested any more (according to your own answer), I will answer the original question anyway for future reference.
There is a class called UserSearchManager in Smack that can be used for this purpose.