presence notification in smack api
in
Contributed Library Questions
•
2 years ago
hello
i'm trying to implement a chat using SMACK API library. now I have a problem to presence notification. this is the code:
public void displayBuddyList()
{
Roster roster = connection.getRoster();
Collection<RosterEntry> 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

i'm trying to implement a chat using SMACK API library. now I have a problem to presence notification. this is the code:
public void displayBuddyList()
{
Roster roster = connection.getRoster();
Collection<RosterEntry> 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

1