I use Smack to exchange xmpp messages, on the OpenFire server OpenFire created two users, created the Friends group and added these users to this group.
Now on the phone I want to get a list of users in Roster , for this I use the following code:
Roster roster = Roster.getInstanceFor(connection); Collection<RosterEntry> entries = roster.getEntries(); Presence presence; for(RosterEntry entry : entries) { presence = roster.getPresence(entry.getUser()); Log.e("Users in roster ", entry.getUser()); Log.e("Name of user in roster ", presence.getType().name()); Log.e("Status in roster", presence.getStatus()); } I get the size of the entries zero. Accordingly, the log does not display the name of users who are in the roster . Why is roster size zero? How to get users who are in the roster ? Both users are online. I can send a message to the user (for this I exclude problems with connection).
I also want to add that in OpenFire itself in the OpenFire section I see a user who is in the roster :


mod_roster? - Suvitruf ♦