BannerJavascriptInterface

class BannerJavascriptInterface(context: Context, val placementId: String, val setHeightCallback: (Double) -> Unit = {}) : JavascriptInterfaceBase

BannerJavascriptInterface.

Parameters

context
placementId

The placement ID of the banner.

setHeightCallback

a callback to set the height of the banner. You must convert to absolute pixels before calling this method.

Constructors

Link copied to clipboard
constructor(context: Context, placementId: String, setHeightCallback: (Double) -> Unit = {})

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
Link copied to clipboard
fun changeUser(userId: String, sdkAuthSignature: String?)

Changes the current Braze user.

Link copied to clipboard
open override fun logButtonClick(buttonId: String?)

Logs a button click for the given button identifier.

Link copied to clipboard
open override fun logClick()

Logs a click on the message associated with this JavaScript interface.

Link copied to clipboard
fun logCustomEventWithJSON(eventName: String?, propertiesJSON: String?)

Logs a custom event with optional JSON-encoded properties.

Link copied to clipboard
fun logPurchaseWithJSON(productId: String?, price: String, currencyCode: String?, quantity: String, propertiesJSON: String?)

Logs a purchase event with the specified product, price, currency, quantity, and optional JSON-encoded properties.

Link copied to clipboard
fun parseProperties(propertiesJSON: String?): BrazeProperties?
Link copied to clipboard

Requests an immediate flush of any pending analytics data to the Braze servers.

Link copied to clipboard
Link copied to clipboard
fun setBannerHeight(height: Double)