Set conversation draft
Introduction
A conversation draft refers to a text message that the user is currently editing but has not yet sent. ZIM supports saving conversation drafts locally even after the user exits the conversation, so that the user can continue editing.
Procedures
By calling the setConversationDraft interface and specifying the conversation ID and conversation type, you can save the draft to the conversation.
Note
To clear the conversation draft, pass an empty string for the draft
field.
After successfully saving the draft, you can use the onConversationChanged callback interface to get the updated conversation information.
Untitled
// Set a draft for a conversation
// Take a group conversation as an example
zim.setConversationDraft("draft", "Group_ID", ZIMConversationType.GROUP, new ZIMConversationDraftSetCallback() {
@Override
public void onConversationDraftSet(ZIMError errorInfo) {
// Callback of the operation
}
});
1