I am working on multichatuser in android reading on various article in different websites and also in stackoverflow. I am trying to query the server to return all public rooms available without knowing this names of the rooms in advance. So that client can display a list of all public rooms available and join them accordingly.
So far I have done following things:
//room11 is the list array
//lv is the list view
Collection<HostedRoom> rooms = MultiUserChat.getHostedRooms(connection, service);
for(HostedRoom room : rooms) {
room11.add(room.getName());
}
adapter = new ArrayAdapter<String>(this,R.layout.listitems,R.id.list_content, room11);
lv.setAdapter(adapter);
It does not show any error nor add anything in the listview.
Thank you in advance for your help.