更新时间: 2021-03-08
# 功能描述
开发者可通过下面方法来清除数据库内所有会话
# 清除本地会话列表
SDK 内部清除所有的会话类型的会话列表的方法. 可使用 SDK 的 按会话类型删除 会话的方式, 循环删除来实现.
# 代码示例
// 类型可自行添加 ConversationType[] conversationTypes = {ConversationType.PRIVATE, ConversationType.GROUP}; // 循环删除 for (conversationType : conversationTypes ) { RongIMClient.getInstance().removeConversation(conversationType, targetId, new ResultCallback<Boolean>() { @Override public void onSuccess(Boolean success) { } @Override public void onError(RongIMClient.ErrorCode ErrorCode) { } }); }
已复制
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# 清除远端会话列表
SDK 不支持此功能