Skip to content

Content Cards integration

Learn how to integrate Content Cards for the Cordova Braze SDK.

Prerequisites

Before you start, you need to integrate the Cordova Braze SDK into your iOS or Android app.

Card Feeds

The Braze SDK includes a default card feed. To show the default card feed, you can use the launchContentCards() method. This method handles all analytics tracking, dismissals, and rendering for a user’s Content Cards.

Content Cards

You can use these additional methods to build a custom Content Cards Feed within your app:

Method Description
requestContentCardsRefresh() Sends a background request to request the latest Content Cards from the Braze SDK server.
getContentCardsFromServer(successCallback, errorCallback) Retrieves Content Cards from the Braze SDK. This will request the latest Content Cards from the server and return the list of cards upon completion.
getContentCardsFromCache(successCallback, errorCallback) Retrieves Content Cards from the Braze SDK. This will return the latest list of cards from the local cache, which was updated at the last refresh.
logContentCardClicked(cardId) Logs a click for the given Content Card ID.
logContentCardImpression(cardId) Logs an impression for the given Content Card ID.
logContentCardDismissed(cardId) Logs a dismissal for the given Content Card ID.

GIF Support

By default, the native Braze Android SDK does not provide animated GIF support for Content Cards—however, you can use a third-party image library to display GIFs instead. For more information, see Android Content Cards: GIFs.

By default, the Braze Swift SDK does not provide animated GIF support for Content Cards—however, you can wrap your own view or a third-party view in an instance of GIFViewProvider. For a full walkthrough, see Tutorial: GIF Support for Swift Content Cards.

HOW HELPFUL WAS THIS PAGE?
New Stuff!