showAd

Show a previously loaded interstitial ad.

Parameters

activity

The activity to show the ad from

callback

Receives show lifecycle events


open fun showAd(activity: Activity, adUnitId: String, callback: InterstitialAdProvider.InterstitialShowCallback)

Show the ad that was loaded for adUnitId.

Default implementation ignores the ad unit and delegates to showAd, which is correct for single-slot providers. Providers that cache ads per ad unit should override this to show the exact ad loaded for adUnitId.