I have a context menu item that will apply to all users in a contact group, regardless of whether they are online. However, the ContextMenuListener#poppingUp notification returns a ContactGroup object containing only those users that are online. Anyone know of a workaround for this?
Thanks
Solved it this way:
/** Returns all the contacts in a {@link ContactGroup}, including offline
*/
public List();
String groupName = contactGroup.getGroupName();
Roster roster = SparkManager.getConnection().getRoster();
for (RosterEntry entry : roster.getEntries())
{
for (RosterGroup group : entry.getGroups())
{
if ( groupName.equals(group.getName()) ) {
result.add(new ContactItem(entry.getName(), entry.getUser()));
continue;
}
}
}
return result;
}