powered by Jive Software

Empty roster, what am i doing wrong?


#1

Hello, I have installed and configured openfire 4.2.1.
All clients which I tried (pidgin, gajim, IM+) work fine and display contact list properly.
But when I try using the smack 4.2.2 to get contacts list, it turns out empty.

Source code for the test:
https://pastebin.com/5Bscd8Y9

The test output:
Configure connection
Create connection
Log in
List roster
Num entries 0
Num groups 0
Close connection


#2

He Roster may not be loaded right after login(), I suggest to use a roster loaded listener: https://download.igniterealtime.org/smack/docs/latest/javadoc/org/jivesoftware/smack/roster/Roster.html#addRosterLoadedListener-org.jivesoftware.smack.roster.RosterLoadedListener-


#3

Thank you. It’s working.