Browse SDKs · Android
SDKsAndroidEnterprise

Enable or disable burn after reading

Use setOneConversationPrivateChat() to configure burn-after-reading mode for an Android conversation.

Copy
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
);

Pass false to disable burn after reading. Set the duration separately with burnDuration; see Set the burn duration. This is distinct from scheduled server message deletion. Reconcile the final state through onConversationChanged.