I am new to xmpp/asmack in android.
Can anyone please help me in getting the presence of the user\'s friends ( roster list)
I am using this :
As my experience before you can see status and other from Presence you need to subscribe the user.
for example: user A want to see status and available status from user B, in this case, user A need to subscribe user B. after that user A can see the user B Presence.
Subscribe Code
try {
roster.setDefaultSubscriptionMode(Roster.SubscriptionMode.manual);
String userName = responders.getUsers().get(i).getUsername();
roster.createEntry("userB@domain", userName, null);
Presence pres = new Presence(Presence.Type.subscribe);
pres.setFrom("userA@domain");
connection.sendStanza(pres);
} catch (Exception e) {
android.util.Log.e("tag", "unable to add contact: ", e);
}