onAdClicked

abstract fun onAdClicked(event: ClickEvent, error: ClickError?)

Called after an ad has been clicked. Implement this method to be notified when an ad has been clicked. If the click does not result in the opening of a link, an error will be provided explaining why.

A typical implementation would look like this:

fun onAdClicked(event: ClickEvent, error: ClickError?) {
if (error != null) {
// Handle error
} else {
// Maybe pause ongoing processes like video or gameplay when a banner ad is clicked.
}
}

Parameters

event

A click event with information related to the ad clicked.

error

An error specifying the failure reason, or null if the operation was successful.