SDKsAndroid商业版
开启或关闭阅后即焚
使用 setOneConversationPrivateChat() 设置 Android 会话的阅后即焚模式。
OpenIMClient.getInstance().conversationManager.setOneConversationPrivateChat(
new OnBase<String>() {
@Override
public void onSuccess(String data) {
markPrivateChatSubmitted(conversationID, true);
}
@Override
public void onError(int code, String error) {
recordPrivateChatFailure(code, error);
}
},
conversationID,
true
);传入 false 关闭阅后即焚。具体保留时长由 burnDuration 单独设置,见设置阅后即焚时长。该能力与定期删除服务端消息不同。
成功 callback 只表示设置请求完成;最新状态通过 onConversationChanged 按 conversationID 合并,完整 listener 见获取会话列表。
这个页面有帮助吗?