Skip to main content

Test your integration with test ads

Request Test Ads

When testing you should request ads by setting the test flag to true when initializing XMediator and when creating ad instances. We use this flag to ask the underlying networks to provide us with test ads when possible.

info

Some mediation services (or their underlying networks) may not support this flag and might provide other means to test their integration, so make sure to always check their documentation for any additional steps.

We do provide test Placement Ids to enable a quick way to test the integration.

Test Placement Ids

PlacementMAX MediationLevelPlay MediationAdMob Mediation
App keyV148L42DB1V148L42DB8V148L48DBJ
BannerV142DR9L2247MGV142DR2LD0QYR1V14JHR4Z2LKRFYNP
InterstitialV142DRJLE1G5XXV142DR1L7WJN07V14JHR28KLVMZGXJ
App OpenV14JHR4ZKL86RTC2-V14JHR283LMV0WYT
RewardedV142DR4LW2MT4BV142DR8L1DP5NDV14JHR282L889BY3

Currently, these placements are only supported for these ad networks: Google Ads, AppLovin and Unity Ads.

warning

Remember to replace these test placements with your own placements and always set the test and verbose flags to false in a production environment

Enable test mode

Set the test flag to true to see test ads when available.

val shouldRequestTestAds = BuildConfig.DEBUG

// Initialize
XMediatorAds.startWith(
activity = activity,
appKey = "V148L42DB1",
initSettings = InitSettings(test = shouldRequestTestAds),
initCallback = {
XMediatorAds.Banner.create("V142DR9L2247MG", Banner.Size.Phone)
XMediatorAds.Interstitial.load("V142DRJLE1G5XX")
XMediatorAds.Rewarded.load("V142DR4LW2MT4B")
}
)

Enable verbose logging

Setting the verbose flag to true will output extra logging information to Logcat.

XMediatorAds.startWith(
activity = activity,
appKey = "V148L42DB1",
initSettings = InitSettings(verbose = true),
initCallback = {}
)