I use the jabberd2 server. I’'ve creates an admin
account on the server, so i have the privileges to
see all online users. i’'ve tested this the JAJC
client and it works.
I checked the XMPP specs and I couldn’‘t find that an admin user should receive the presence notifications of all the users in the server. Smack only supports the XMPP spec so unless this requirement is correct you won’'t find official support for it.
But it seems that smack ignores the admin privileges
of the user. I’'ve implemented the PacketListener and
the RosterListener. I need the presence state
information of all users, but I only get it if the
presence of an user that is on my buddy list
Is this actually possible with smack? (im using smack
First off, you should download the latest release which is 1.4.0. This release won’'t solve your request but it adds new important features and many bug fixes.
As you noticed, Smack will only fire the RosterListeners whenever a user that is in the roster originated a presence notification. However, Smack will maintain all the received presences no matter whether the user is in the roster or not. Therefore, you can create your own PacketListener that will listen for packets of type Presence and you can use Roster.getPresence(String user) in order to retrieve the received presences.