android sdk:3.13.10
错误日志
errorMessage {
code: 4301
reason: "CONVERSATION_API_FAILED"
detail: "111: Invalid value type for field \'c\',expect type is {:type \"Object\"},but it is \'{:type \"String\"}\'."
}
获取conversion代码
public static void getConversation(final String memberId){
final AVIMClient client = AVImClientManager.getInstance().getClient();
AVIMConversationQuery conversationQuery = client.getQuery();
conversationQuery.withMembers(Arrays.asList(memberId),true);
conversationQuery.whereEqualTo("customConversationType",1);
conversationQuery.findInBackground(new AVIMConversationQueryCallback() {
@Override
public void done(List<AVIMConversation> list, AVIMException e) {
if (e != null) {
e.printStackTrace();
// return false;
} else {
if(null != list && list.size() > 0){
sConversation = list.get(0);
}else {
HashMap<String, Object> attributes = new HashMap<String, Object>();
attributes.put("customConversationType",1);
client.createConversation(Arrays.asList(memberId), null, attributes, false, new AVIMConversationCreatedCallback() {
@Override
public void done(AVIMConversation avimConversation, AVIMException e) {
sConversation = avimConversation;
}
});
}
}
}
});
}
-
创建时间
16年6月8日
-
最后回复
16年6月8日
-
2
回复
-
982
浏览
-
2
用户