Skip to main content
Self-handled cards give you the flexibility of creating Card Campaigns on the MoEngage Platform and displaying the cards anywhere inside the application. SDK provides APIs to fetch the campaign’s data using which you can create your own view for cards.

Get Cards Info

Fetch All the cards campaign data that are eligible to show for the particular user which returns data as CardsInfo
Refer to the Cards Data Payload to get the details about the available data in CardsInfo.

Widget and Widget ID Mapping

Basic Card/Illustration Card

Refresh Cards

Use the refreshCards*()*** API to refresh cards on the User Demand. This API can be used to mimic Pull to refresh behavior.
Refer to the Cards Data Payloadto get the detail about the available data in SyncCompleteData.

Fetch Cards

Use the fetchCards*()*** API to fetch cards for the User. This API can be used to sync the latest cards data.
Refer to the Cards Data Payloadto get the details about the available data in CardsData.
For details on the sync timing and rate limits for fetchCards(), see When Does the MoEngage SDK Sync Card Data?

Inbox Loaded

You can show the cards on a separate screen or a section of the screen. When the cards screen/section is loaded call onCardSectionLoaded().
Refer to the Cards Data Payloadto get the details about the available data in SyncCompleteData.

Inbox UnLoaded

Call onCardSectionUnloaded() when the screen/section is no longer visible or going to the background.

Fetch Categories

To fetch all the categories for which cards are configured, use thegetCardsCategories() API. It will return an array of strings.

All Cards Categories Enabled

To fetch all the categories for which cards are configured, use theisAllCategoryEnabled() API.

Fetch Cards for Categories

To fetch cards eligible for display for a specific category use the getCardsForCategory() API.
Refer to the Cards Data Payloadto get the details about the available data in CardsData.

Get New Cards Count

To obtain the new cards count use ***getNewCardsCount()***method as shown below:

Card Shown

Call the cardShown() API to notify a card is shown to the user.

Card Clicked

Call the cardClicked() API to notify a card is shown to the user.

Delete Card

Call the deleteCard() API to delete a card.

Mark Card Delivered

To track delivery to the card section of the application call the cardDelivered() API when the cards section of the application is loaded.

Get Unclicked Cards Count

To obtain the unclicked cards count use ***getUnClickedCardsCount()***method as shown below.

Card Sync Listener

Version 4.0.0 and below.

Set this listener to get a callback for card sync on the App opened. This listener should be set before calling ***initialize()***API. In most cases, this API is not required.

Version  5.0.0 and above.

Set this listener to receive a callback for card sync upon app launch or when user login.This listener should be set before calling ***initialize()***API.
Refer to the Cards Data Payloadto get the details about the available data in SyncCompleteData.