Skip to content

AdMob Adapter

This guide covers the integration of Boldwin SDK through Google AdMob mediation. The Boldwin SDK supports the following ad formats:

  • Banner
  • MREC
  • Interstitial
  • Rewarded

AdMob Mediation Integration

For detailed AdMob mediation setup instructions, see the official AdMob mediation documentation.

Android Setup

Add Boldwin SDK to your app

Follow the integration guide.

Add to your app's build.gradle:

dependencies {
    // Boldwin SDK
    implementation 'com.boldwin.sdk:core:1.15.15'
    // AdMob Boldwin Adapter
    implementation 'com.boldwin.sdk:admob-adapters:1.15.15'
}

Configure Boldwin as a Custom Event

Boldwin integrates with AdMob mediation as a custom event.

  1. Log in to your AdMob dashboard.
  2. Go to Mediation and click Create mediation group.
  3. Select the ad format and Android as the platform, then click Continue.
  4. Name the group, set the eCPM and select the ad units to mediate.
  5. Under Ad sources, click Add custom event.

AdMob Mediation Group

Configure Boldwin For Ad Units

  1. Enter a Label (for example Boldwin) and the eCPM.
  2. Set Class Name to com.google.ads.mediation.boldwin.BoldwinMediationAdapter.
  3. Set Parameter to the Boldwin configuration JSON (see below).
  4. Map the custom event to your ad units and save.

AdMob Custom Event

Example of the Parameter value:

{
  "placement_id": "<YOUR_PLACEMENT_ID>",
  "publisher_id": "<YOUR_PUBLISHER_ID>",
  "ad_sizes": [
    {
      "w": <WIDTH>,
      "h": <HEIGHT>
    }
  ]
}

The parameter includes the following keys:

  • placement_id - The Boldwin placement ID. Required.
  • publisher_id - The Boldwin publisher ID. Optional. Used only to initialize the Boldwin SDK when your app has not initialized it already.
  • ad_sizes - An array of ad sizes. You can set multiple sizes. Required for banner and MREC ad formats. When omitted, the size of the AdMob ad unit is used. For interstitial and rewarded ads, sizes can be omitted.

Example of an ad_sizes value requesting both a 320x50 banner and a 300x250 MREC:

{
  "placement_id": "<YOUR_PLACEMENT_ID>",
  "publisher_id": "<YOUR_PUBLISHER_ID>",
  "ad_sizes": [
    {
      "w": 320,
      "h": 50
    },
    {
      "w": 300,
      "h": 250
    }
  ]
}