Documentation Index
Fetch the complete documentation index at: https://cometchat-22654f5b-feature-android-campaigns.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
CometChatNotificationFeed displays a scrollable notification feed where each item is rendered as a native card using the CometChat Cards library. It handles fetching, pagination, category filtering, timestamp grouping, real-time updates, and read/delivered/engagement reporting automatically.

Where It Fits
CometChatNotificationFeed is a full-screen component. Drop it into an Activity, Fragment, or navigation destination. It manages its own data fetching, state, and real-time listeners — you just handle navigation callbacks.
- Jetpack Compose
- Kotlin (XML Views)
Quick Start
- Jetpack Compose
- Kotlin (XML Views)
CometChatUIKit.init() and a user logged in.
Filtering Feed Items
Control what loads using custom request builders:- Jetpack Compose
- Kotlin (XML Views)
Filter Options
| Builder Method | Description |
|---|---|
.setLimit(int) | Items per page (default 20, max 100) |
.setReadState(FeedReadState) | READ, UNREAD, or ALL |
.setCategory(String) | Filter by category ID |
.setChannelId(String) | Filter by channel |
.setTags(List<String>) | Filter by tags |
.setDateFrom(String) | ISO 8601 date lower bound |
.setDateTo(String) | ISO 8601 date upper bound |
Actions and Events
Callback Methods
onItemClick
Fires when a feed item card is tapped.
- Jetpack Compose
- Kotlin (XML Views)
onActionClick
Fires when an interactive element (button, link) inside a card is tapped.
- Jetpack Compose
- Kotlin (XML Views)
onError
Fires when an internal error occurs (network failure, SDK exception).
- Jetpack Compose
- Kotlin (XML Views)
onBackPress
Fires when the back button in the header is tapped.
- Jetpack Compose
- Kotlin (XML Views)
Automatic Behaviors
The component handles these automatically — no manual setup needed:| Behavior | Description |
|---|---|
| Real-time updates | New items appear at the top via WebSocket listener |
| Delivery reporting | Items are reported as delivered when fetched |
| Read reporting | Items are reported as read after 1 second of visibility |
| Unread count polling | Polls unread count every 30 seconds to update badges |
| Infinite scroll | Fetches next page when scrolling near the bottom |
| Pull-to-refresh | Resets and fetches fresh data on pull |
| Timestamp grouping | Groups items as “Today”, “Yesterday”, day name, or date |
| Category filtering | Filter chips row for category-based filtering |
Functionality
| Method (XML Views) | Compose Parameter | Description |
|---|---|---|
setTitle("Notifications") | title = "Notifications" | Header title text |
setShowHeader(true) | showHeader = true | Toggle header visibility |
setShowBackButton(false) | showBackButton = false | Toggle back button |
setShowFilterChips(true) | showFilterChips = true | Toggle category filter chips |
setFeedRequestBuilder(...) | feedRequestBuilder = ... | Custom feed request |
setCategoriesRequestBuilder(...) | categoriesRequestBuilder = ... | Custom categories request |
Custom View Slots
Header View
Replace the entire header:- Jetpack Compose
State Views
- Jetpack Compose
Style
- Jetpack Compose
- Kotlin (XML Views)
Style Properties
| Property | Description |
|---|---|
backgroundColor | Screen background color |
headerBackgroundColor | Header bar background |
headerTitleColor | Header title text color |
headerBorderColor | Divider below header |
chipActiveBackgroundColor | Selected filter chip background |
chipActiveTextColor | Selected filter chip text |
chipInactiveBackgroundColor | Unselected filter chip background |
chipInactiveTextColor | Unselected filter chip text |
chipBorderColor | Filter chip border |
badgeActiveBackgroundColor | Active chip badge background |
badgeActiveTextColor | Active chip badge text |
badgeInactiveBackgroundColor | Inactive chip badge background |
badgeInactiveTextColor | Inactive chip badge text |
timestampTextColor | Section header timestamp color |
cardBackgroundColor | Card container background |
cardBorderColor | Card container border |
cardBorderRadius | Card corner radius |
cardBorderWidth | Card border width |
unreadIndicatorColor | Unread dot indicator color |
separatorColor | Separator between cards |
Color.Unspecified (Compose) or 0 (XML) to inherit from CometChatTheme. Override individual values without losing theme support.
ViewModel Access
The component usesCometChatNotificationFeedViewModel from the shared chatuikit-core module. You can provide a custom ViewModel for advanced scenarios:
- Jetpack Compose
ViewModel Factory Parameters
| Parameter | Default | Description |
|---|---|---|
feedRequestBuilder | null | Custom feed request builder |
categoriesRequestBuilder | null | Custom categories request builder |
enableListeners | true | Enable WebSocket listeners (false for testing) |
pollingIntervalMs | 30000 | Unread count polling interval in ms |
Common Patterns
Show only unread items
- Jetpack Compose
Hide filter chips and header
- Jetpack Compose
- Kotlin (XML Views)
Custom categories request
- Jetpack Compose
Next Steps
Campaigns Feature
Overview of how campaigns work end-to-end
SDK Campaigns API
Low-level SDK APIs for feed items, categories, and engagement
Component Styling
Full styling reference for all components
ViewModel & Data
Custom ViewModels, repositories, and ListOperations