Presence notification in SMACK API

hello

i have a problem to presence notification. this is the code:

public void displayBuddyList()

{

Roster roster = connection.getRoster();

Collection entries = roster.getEntries();

System.out.println("\n\n" + entries.size() + " buddy(ies):");

Presence presence;

for(RosterEntry r:entries)

{

System.out.println(r.getUser());

presence = roster.getPresence(r.getUser());

System.out.println(presence);

}

}

but my contacts are always unavailable Could you help me? pleaseeeeeeeeeee