Browse SDKs · Android
SDKsAndroidEnterprise

Set the burn duration

Use setConversationBurnDuration() to set the burn-after-reading retention duration.

Copy
OpenIMClient.getInstance().conversationManager.setConversationBurnDuration(
    new OnBase<String>() {
        @Override
        public void onSuccess(String data) {
            // The request completed.
        }

        @Override
        public void onError(int code, String error) {
            // code and error describe the failure.
        }
    },
    conversationID,
    30
);

burnDuration is measured in seconds. Enable or disable burn after reading with isPrivateChat; do not confuse this value with the scheduled server deletion period msgDestructTime. Conversation list changes can be received through onConversationChanged; see Get the conversation list for listener setup.