Mediation

Show Ads

Showing Fullscreen Ads πŸ”—

The new fullscreen APIs combine the existing Rewarded and Interstitial ad formats into a single integration experience.

Once you receive the fullscreen ad from the ad load request, you are ready to show it at your convenience.

  • // While in a coroutine
    val loadResult = // [from load]
    val showResult = loadResult.ad?.show(context)
    
  • // After loading an ad
    public void onAdLoaded(ChartboostMediationFullscreenAd ad) {
        ad.showFullscreenAdFromJava(context, new ChartboostMediationFullscreenAdShowListener() {
            public void onAdShown(ChartboostMediationAdShowResult
     result) {
            // Shown
            }
        )
    }
    

Showing Banner Ads πŸ”—

Banners are automatically shown after being attached to a view hierarchy.

If you enable auto-refresh for banner placement in the dashboard, then the Mediation SDK will apply that setting when the placement is shown.

Any auto-refresh changes made on the dashboard will take approximately one hour to take effect and the SDK must be rebooted in order to pick up the changes once they’re available.

Releasing Ads πŸ”—

To clear resources used by Mediation, you can use the destroy method associated with the respective Mediation ad you have used.

override fun onDestroy() {
  ...
  // Release banner ad
  chartboostMediationBannerAdView?.let {
      it.destroy();
      Log("destroyed an existing banner");
  }
  ...
}