Content Cards Data Model

The Content Cards data model is available in the Android SDK.

Card Types

Braze has 3 unique Content Cards card types which share a base model. Each card type also has additional card-specific properties which are listed below.

Base Card

The Base Card model provides foundational behavior for all cards.

Property Description
getId() Returns the card’s ID set by Braze.
getViewed() Returns a boolean reflects if the card is read or unread by the user.
getExtras() Returns a map of key-value extras for this card.
getCreated() Returns the unix timestamp of the card’s creation time from Braze.
getIsPinned Returns a boolean that reflects whether the card is pinned.
getOpenUriInWebView() Returns a boolean that reflects whether Uris for this card should be opened
in Braze’s WebView or not.
getExpiredAt() Gets the expiration date of the card.
getIsRemoved() Returns a boolean that reflects whether the end user has dismissed this card.
getIsDismissible() Returns a boolean that reflects whether the card is pinned.

Banner Image Cards are clickable full-sized images. In addition to the base card properties:

Property Description
getImageUrl() Returns the URL of the card’s image.
getUrl() Returns the URL that will be opened after the card is clicked. It can be a http(s) URL or a protocol URL.
getDomain() Returns link text for the property URL.

Captioned Image Card

Captioned Image Cards are clickable full-sized images with accompanying descriptive text. In addition to the base card properties:

Property Description
getImageUrl() Returns the URL of the card’s image.
getTitle() Returns the title text for the card.
getDescription() Returns the body text for the card.
getUrl() Returns the URL that will be opened after the card is clicked. It can be a http(s) URL or a protocol URL.
getDomain() Returns the link text for the property URL.

Classic Card

Text Announcement Cards are clickable cards containing descriptive text. In addition to the base card properties:

Property Description
getTitle() Returns the title text for the card.
getDescription() Returns the body text for the card.
getUrl() Returns the URL that will be opened after the card is clicked. It can be a http(s) URL or a protocol URL.
getDomain() Returns the link text for the property URL.

Card Analytics Methods

All Card data model objects offer the following analytics methods for logging user events to Braze servers.

Method Description
logImpression() Manually log an impression to Braze for a particular card.
logClick() Manually log a click to Braze for a particular card.
setIsDismissed() Manually log a dismissal to Braze for a particular card. If a card is already marked as dismissed, it cannot be marked as dismissed again.
WAS THIS PAGE HELPFUL?
New Stuff!