Skip to content

Content Card integration

Learn how to set up iOS, Android, and FireOS Content Cards for the Xamarin platform.

The Braze SDK includes a default card feed to get you started with Content Cards. The default card feed included with the Braze SDK will handle all analytics tracking, dismissals, and rendering for a user’s Content Cards.

For information on how to integrate the Content Cards into your Xamarin app, see our Android integration guide and iOS integration guide.

Prerequisites

To use this feature, you’ll need to integrate Braze SDK for the Xamarin platform.

Content Card methods

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

Method Description
requestContentCardsRefresh() Requests the latest Content Cards from the Braze SDK server.
getContentCards() Retrieves Content Cards from the Braze SDK. This will return the latest list of cards from the server.
logContentCardClicked(cardId) Logs a click for the given Content Card ID. This method is used only for analytics.
logContentCardImpression(cardId) Logs an impression for the given Content Card ID.
logContentCardDismissed(cardId) Logs a dismissal for the given Content Card ID.

Content Card data model

The Braze Xamarin SDK has three unique Content Cards card types that share a base model: banner, captioned image, and classic. Each type inherits common properties from a base model and has the following additional properties.

Base Content Card model properties

For a full reference of the base card, see the Android and iOS documentation.

Banner cards are clickable, full-sized images.

For a full reference of the banner card, see the Android and iOS documentation (now renamed to image only).

Captioned image Content Card model properties

Captioned image cards are clickable, full-sized images with accompanying descriptive text.

For a full reference of the captioned image card, see the Android and iOS documentation.

Classic Content Card model properties

Classic cards have a title, description, and an optional image on the left of the text.

For a full reference of the classic (text announcement) Content Card, see the Android and iOS documentation. For a full reference of the classic image (short news) card, see the Android and iOS documentation.

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!