I am creating a java fx application for openfire chat client. i am using smack 4.1 rc1 to connect to the server. i am able to to connect to server send presence information to others and send messages to other users as well. however i am not able to iterate through the roster.
when i get roster object and debug it its shows a hash map of 3 roster entries that means the roster is getting loaded in roster object. however when i use roster.getentries method to store it into the Collection of roster entries it shows 0 object. even the roster.getentriescount() method returns 0 though i can see the roster user names in the debug view
Roster roster = Roster.getInstanceFor(conn); Collection<RosterEntry> entries = roster.getEntries(); int i=0; for (RosterEntry entry : entries) { System.out.println(entry); i++; } System.out.println("Rosters Count - "+ i+ roster.getEntryCount());
has any one encountered the same problem before?