Card

open class Card constructor(jsonObject: JSONObject, cardKeysProvider: CardKey.Provider, brazeManager: IBrazeManager?, cardStorage: ICardStorageProvider<*>?, cardAnalytics: ICardAnalyticsProvider?) : IPutIntoJson<JSONObject?>

Creates a card.

Parameters

jsonObject

JSON representation of the card

cardKeysProvider

The CardKey.Provider responsible for providing the appropriate key for a field.

brazeManager

Allows the card to report clicks internally

cardStorage

Allows the card to persist its viewed/unviewed state

Throws

When the provided JSON object is malformed

Inheritors

Constructors

Link copied to clipboard
constructor(jsonObject: JSONObject, cardKeyProvider: CardKey.Provider)
constructor(jsonObject: JSONObject, cardKeysProvider: CardKey.Provider, brazeManager: IBrazeManager?, cardStorage: ICardStorageProvider<*>?, cardAnalytics: ICardAnalyticsProvider?)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
open val cardType: CardType

The CardType representing the type of this card or CardType.DEFAULT if the type is not known.

Link copied to clipboard

The categories for this Feed card. Note that this value will be null for ContentCards.

Link copied to clipboard
Link copied to clipboard

The UNIX creation time of this Card, in seconds.

Link copied to clipboard

Gets the expiration date of the card. Values < 0 mean the card never expires.

Link copied to clipboard

A map of key-value pair extras for this card.

Link copied to clipboard
val id: String
Link copied to clipboard

Gets the clicked state of this card. Note that clicks are stored on disk so subsequent instances of this card will retain its clicked state upon recreation.

Link copied to clipboard
Link copied to clipboard

Returns whether this card is a control card. Control cards should not be displayed to the user.

Link copied to clipboard

Indicates if this card is dismissed.

Link copied to clipboard

True if this card is dismissible by the user, false otherwise.

Link copied to clipboard

True if this card's expiration date has already passed.

Link copied to clipboard

The current status of visual indicator at the bottom of the card highlight state. This value changes from true to false when the card goes offscreen for the first time.

Link copied to clipboard

Whether this card is pinned.

Link copied to clipboard

True if this card was marked as removed, false otherwise.

Link copied to clipboard

Whether this Card arrived from a Braze Dashboard test send.

Link copied to clipboard

The ICardListener that gets called when isIndicatorHighlighted is set.

Link copied to clipboard

Whether Uris for this card should be opened in Braze's WebView or not.

Link copied to clipboard

The UNIX last update time of this Card, in seconds.

Link copied to clipboard
open val url: String? = null

The url string associated with the card click action or null if not implemented by child class.

Link copied to clipboard

Whether this card has had its impression logged already.

Functions

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean

Compares against another Card instance.

Link copied to clipboard
open override fun forJsonPut(): JSONObject

The JSONObject representation of this card.

Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Reports this card was clicked.

Link copied to clipboard

Reports that this card was displayed to the user.

Link copied to clipboard
open override fun toString(): String