powered by Jive Software

getRoster returns 0


I’m using this code:

roster = connection.getRoster();


roster.addRosterListener(new RosterListener() {

public void presenceChanged(Presence presence) {


And randomly getting empty roster. I mean that randomly getRoster methos blocks for a second and than returns no entries. And the following RosterListener actually listen nothing. Overwise it’s OK. i’m getting non-empty roster and RosterListener works just fine.

Tha’s the problem?


Maybe you should add a test to see if the user authenticated successfully.


Thanks for the answer, but it’s authenticated for sure. Maybe you have other suggestions?

Have you also already sent the initial presence? Other than that, I’m out of ideas.

Yes, I’m already sent initial presence. I don’t know what was that, but after I rewrited the code entirely, it’s OK now. Thanks.