powered by Jive Software

About MultiUserChat.isServiceEnabled(con, con.getUser())

public List getJoinedRooms() {

List rooms = new ArrayList();

//判断用户是否支持Multi-User聊天协议

//注:需要加上资源标识符

boolean supports = MultiUserChat.isServiceEnabled(con, con.getUser());

System.out.println(“判断用户是否支持Multi-User聊天协议—”+supports);

//获取某用户所加入的聊天室

if(supports) {

Iterator jrs = MultiUserChat.getJoinedRooms(con, con.getUser());

System.out.println("—>"+con.getUser());

// Iterator jrs = MultiUserChat.getJoinedRooms(con, “xjp”);

while(jrs.hasNext()){

System.out.println("@@@@@@@@test3 has joined Room " + jrs.next());

String name = jrs.next();

System.out.println(“name=”+name);

MucRoom mr = new MucRoom();

mr.setName(name);

rooms.add(mr);

}

}

return rooms;

}

boolean supports = MultiUserChat.isServiceEnabled(con, con.getUser());

I want to get list of MucRoom but supports is always false 。how to do this it. My asmack is asmack-android-17-0.8.1.1.jar