CometChat Campaigns enables you to send rich, interactive notifications to users through an in-app notification feed. Each notification is rendered as a native card using the CometChat Cards library — supporting images, text, buttons, layouts, and interactive actions.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.

Overview
Campaigns delivers notifications as Card Schema JSON — a structured format that defines the visual layout of each notification card. The system consists of three layers:- CometChat Chat SDK — Fetches feed items, manages read/delivered state, provides real-time listeners, handles push notification tracking
- CometChat Cards Library — Renders Card Schema JSON into native Android views (Jetpack Compose and XML Views)
- CometChat UI Kit — Provides the ready-to-use
CometChatNotificationFeedcomponent that wires everything together
Architecture Flow
How Cards Work
EachNotificationFeedItem from the SDK contains a content field — a JSONObject holding the Card Schema JSON. This JSON is passed directly to the CometChat Cards renderer which produces a native view.
The Cards library is a pure renderer:
- Input: Card Schema JSON string + theme mode + optional action callback
- Output: Native Android view hierarchy
Card Schema JSON Example
How Cards Work in the UI Kit
TheCometChatNotificationFeed component uses the CometChat Cards library internally to render each notification. Here’s what happens under the hood:
- The component fetches
NotificationFeedItemobjects from the SDK - For each item, it extracts the
contentfield (Card Schema JSON) - It passes the JSON to
CometChatCardComposable(Compose) orCometChatCardView(XML) from the Cards library - The Cards renderer produces native UI — text, images, buttons, layouts — directly from the JSON
- When users tap buttons/links inside a card, the action is emitted back to the component which handles navigation (open URL, navigate to chat, etc.)
CometChatNotificationFeed — it’s all wired up. But if you want to render cards outside the feed (e.g., a standalone card in a dialog), you can use the Cards library directly. See the SDK Campaigns documentation for standalone usage.
Handling Push Notifications for Campaigns
When a campaign push notification arrives via FCM, you should:- Report delivery — Call
CometChat.markPushNotificationDelivered()in yourFirebaseMessagingService - Report click — Call
CometChat.markPushNotificationClicked()when the user taps the notification - Deep link — Use the announcement ID from the push payload to fetch the full item via
CometChat.getNotificationFeedItem(id)and display it
Sending Campaigns
Campaigns are created and managed from the CometChat Dashboard or via the REST API. The SDK and UI Kit are consumer-side — they display and interact with campaigns, not create them. To send campaigns:- Dashboard: Navigate to Campaigns → Create Campaign → Define audience, content (Card Schema), and delivery channel
- REST API: Use the Campaigns API to programmatically create and schedule campaigns
Using the UI Kit Component
The easiest way to add a notification feed to your app is theCometChatNotificationFeed component. It handles fetching, rendering, pagination, filtering, real-time updates, and engagement reporting out of the box.
- Jetpack Compose
- Kotlin (XML Views)
Next Steps
SDK Campaigns API
Full API reference for feed items, categories, engagement, and push tracking
CometChatNotificationFeed
Ready-to-use component with filtering, real-time updates, and styling