roster.getEntries() returns only one(1) entry

Hi,

I’m using Openfire 3.6.4 and Smack 2.5.8.

I trying to create a simple chat client which will be ported to a hand-held device. I created 3 test clients using smack API w/o any group affiliation. I call both getEntries() and getUnFiledEntries() and only get one entry despite the fact all 3 test users are online. For example, I created user1, user2, user3. My application logs in as user1. I use Spark clients to log in as user2 and user3. The roster list only returns user1, but ignores user2 and user3.

I removed the accounts and recreated the accounts and assign a group name (using smack API). Again calling getEntries() yields only one entry. I finally log into admin console and check to make sure all attributes/permissions are setup correctly (which they are).

I then read about shared groups. I check the Group tab and see the group I created via API is there. However, there are no users attached to the group. I manually add all the users to the group and run the application again. This time I get all 3 entries from the getRoster() call. I then play with the presence of each account and verify the RosterListener() is being called for each presence change.

A few questions.

  1. Why didn’t getUnFiledEntries() work when none of the users were assigned to a group? The documentation seems to state I should have been able to make the call and I should have seen all 3 accounts. Am I misreading the description for getUnFileEntries()?

  2. Do I need to call roster.createGroup() before I call roster.createEntry() in order to have all accounts listed as p/o the shared group?

  3. Is presence only seen if users are in a group? The subscription is set to ACCEPT_ALL, so I’m curious why doesn’t it work. When I check presence, pre-group affiliation, the remote users presence is always unavailable regardless what I do manually to the presence fo the remote users.

  4. I am able to call UserSearchManager and get all the users, and I am able to chat between 2 users, but presence is never forwarded to the RosterListener to let me know when a user has changed his presense.

As a general comment, I noticed that you have to create a roster entry if you want get a populated roster list. This is not made clear in the various examples I’ve seen. Most examples just state, “called getRoster() and then getEntries()” and you should get a roster list. Being new to this, it was misleading that none of the examples even mention you need a roster entry if you plan on getting a roster list.