powered by Jive Software

How to get list of all users using smack

Hi all,

I want to fetch list of all users on the openfire 3.6.3 using smack 3.1.0.

Please let me know the code to fetch this thing.

Please help me.


There is no clean way, but if you search here there is a methode.

ServiceDiscoveryManager discoManager = ServiceDiscoveryManager.getInstanceFor(this.xmppConnection);
try {
DiscoverItems items = discoManager.discoverItems(roomName); //CONFERENCE_SERVICE_NAME

        for (Iterator it = items.getItems(); it.hasNext();) {
            DiscoverItems.Item item = (DiscoverItems.Item) it.next();
            String occupant = item.getEntityID();
    } catch (XMPPException e) {
        logger.error("Cannot check if user is in room!");


you could use the search function to search all users.


hi… how to get all usersid from openfire using smack… pls any suggestions…