Skip to main content
Search Messages lets users locate specific messages across conversations and groups using keyword search, then navigate directly to the result. Before starting, complete the Getting Started guide.

Components


Integration Steps

1. Add CometChatSearch to your layout

activity_search.xml

2. Handle conversation result clicks

When a user taps a conversation result, navigate to the message view for that conversation.
SearchActivity.kt
File: SearchActivity

3. Handle message result clicks

When a user taps a message result, navigate to the conversation and scroll to that message using setMessageId() on the message list.
SearchActivity.kt
File: SearchActivity

4. Scope search to a specific conversation (optional)

Restrict search results to a single user or group conversation.

5. Configure search filters (optional)

Control which filter chips appear and which is selected by default.

Feature Matrix


Next Steps

Search

The search component reference

Message List

Display messages in a conversation

All Guides

Browse all feature and formatter guides

Sample App

Full working sample application on GitHub