Conversation component
The conversation component of the In-app Chat Kit provides the chat list and chat features.
- Chat list: Allow you to view the data of your chat list and support automatic update of the chat list based on chat messages.
- Chat: Create one-on-one chats and group chats.

Integrate the conversation component into your project
Prerequisites
Integrate the In-app Chat Kit SDK into your project (finished the initialization and login are required). For more information, see Quick start.
Add the conversation component
You can add the conversation component to the activity's view hierarchy either by defining the fragment in your activity's layout file or by defining a fragment container in your activity's layout file and then programmatically adding the fragment from within your activity.
Customize features
If the default conversation-relevant features and behaviors don't fully meet your needs, we allow you to flexibly customize those through the config we mentioned in this section.
To customize click event logic, you can listen to the callback on a Conversation
clicked by implementing the registerConversationListListener
.
ZIMKit.registerConversationListListener(new ZIMKitConversationListListener() {
@Override
// !mark(1:4)
public void onConversationListClick(ZIMKitConversationFragment conversationFragment, ZIMKitConversation conversation, DefaultAction defaultAction) {
// Add your own event handling logic here, e.g., jump to the message page.
defaultAction.toMessage();
}
});
API
public interface ZIMKitConversationListListener {
default void onConversationListClick(ZIMKitConversationFragment conversationFragment,
ZIMKitConversation conversation, DefaultAction defaultAction) {}
}