docs
docs copied to clipboard
获取聊天室列表的默认方式
js 和 android 不一样
tom.getQuery().equalTo('tr',true).find(function(conversations){
var chatRoom = conversations[0];// 聊天室对象
}).catch(console.error);
AVIMConversationsQuery query = tom.getChatRoomQuery();
query.findInBackground(new AVIMConversationQueryCallback() {
@Override
public void done(List<AVIMConversation> conversations, AVIMException e) {
if (null != e) {
showToast(e.getMessage());
} else {
// get results.
}
}
});
我偏向于 java 的解决方案,这个比较接近用户的直觉。