Class: ControlCard

ControlCard

A card with no display that logs impressions, which can be passed to appboy.display.showFeed or handled manually. Not supported in legacy news feed. Subscribe to receive new cards via appboy.subscribeToFeedUpdates().

new ControlCard()

Properties:
Name Type Description
id string

The id of the card. This will be reported back to Braze with events for analytics purposes.

viewed boolean

Whether this card has been shown to the user.

updated Date

When this card was last modified.

expiresAt Date

When this card expires and should stop being shown to the user.

extras Object

Object of string/string key/value pairs.

pinned boolean

Whether to pin this card to the top of the view.

Extends

Methods

dismissCard()

Call this method if you wish to dismiss this card programmatically.

Inherited From:

removeAllSubscriptions()

Remove all event subscriptions from this message.

Inherited From:

removeSubscription(subscriptionGuid)

Remove an event subscription that you previously subscribed to.

Parameters:
Name Type Description
subscriptionGuid string

The identifier of the subscription you wish to remove, returned by the method you initially used to create it.

Inherited From:

subscribeToClickedEvent(subscriber) → {string}

Subscribe to receive click events. The subscriber callback will be called whenever this card is clicked by the user.

Parameters:
Name Type Description
subscriber function

The callback function to receive click events. This function will be invoked with no arguments when this card records a click.

Inherited From:
Returns:

The identifier of the subscription created. This can be passed to removeSubscription to cancel the subscription.

Type
string

subscribeToDismissedEvent(subscriber) → {string}

Subscribe to receive dismissed events. The subscriber callback will be called whenever this card is dismissed by the user.

Parameters:
Name Type Description
subscriber function

The callback function to receive dismissed events. This function will be invoked with no arguments when this card records a dismissal.

Inherited From:
Returns:

The identifier of the subscription created. This can be passed to removeSubscription to cancel the subscription.

Type
string