Quantcast
Channel: Ignite Realtime : Discussion List - All Communities
Viewing all articles
Browse latest Browse all 10742

RosterListener not receive presence- version 4.1.0-beta1

$
0
0

Hi everybody,

 

Currently I am working on chat application using Xmpp SMACK API with version 4.1.0-beta1 for Android, but I have a problem when I call addRosterListener(), the Roster add the listener correctly but then I am not receive any presence thought the last method presenceChanged(). I test changing the presence with an Adium client for XMPP. Also, I debugged my method and never start the presence method or any method inside RosterListener. I don't understand because is the documentation code.

 

 

public void getRoster(){        roster = connection.getRoster();        roster.addRosterListener(new RosterListener() {            // Ignored events public void entriesAdded(Collection<String> addresses) {}            @Override            public void entriesAdded(Collection<String> addresses) {            }            @Override            public void entriesDeleted(Collection<String> addresses) {            }            @Override            public void entriesUpdated(Collection<String> addresses) {            }            @Override            public void presenceChanged(Presence presence) {                Log.d("Roster", "Presence changed: " + presence.getFrom() + " " + presence);            }        });    }

 

Thanks.

 

Note: I have users in the presenceMap attribute but I don't have nothing on entries hashmap.


Viewing all articles
Browse latest Browse all 10742

Trending Articles