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

RosterListener() works and not works

$
0
0

http://www.igniterealtime.org/builds/smack/docs/latest/documentation/roster.html

 

 

Roster roster = con.getRoster();

roster.addRosterListener(new RosterListener() {

    // Ignored events public void entriesAdded(Collection<String> addresses) {}

    public void entriesDeleted(Collection<String> addresses) {}

    public void entriesUpdated(Collection<String> addresses) {}

    public void presenceChanged(Presence presence) {

        System.out.println("Presence changed: " + presence.getFrom() + " " + presence);

    }

});

 

when I run this tells me:

 

user1 Error

user2 Error
..

userx Error

 

 

then change the status of user1, it works fine, why?

why at first I get error?

 

Presence changed: test1@delive/Smack available

Presence changed: test1@delive/Smack available: away (Online, Programmatically!)

Presence changed: test1@delive/Smack unavailable


Viewing all articles
Browse latest Browse all 10742

Trending Articles