I created a sendchat text messages, but I cant get the status of other users by using roster method.
Roster roster = connection.getRoster();
Log.e("entry count",""+roster.getEntryCount());
Collection<RosterEntry> entries = roster.getEntries();
Log.e("Roster Entries",""+roster.getEntries().size());
for (RosterEntry entry : entries) {
Presence.Type type = entryPresence.getType();
if (type == Presence.Type.available)
Log.e("XMPPChatDemoActivity", "Presence AVIALABLE");
}
} catch (XMPPException ex) {
setConnection(null);
}
Didn't added users to roster list. After adding users to roster list only, we can get the user details.