Skip to main content

AdMob Custom Adapter

Integrate with AI ·Copy a step-by-step prompt for Claude Code, Cursor, Copilot, or ChatGPT.

Before You Begin

To integrate the Bidease SDK, you need an active publisher account on the Bidease Monetize platform. If you don't have one yet, please reach out to your Bidease account manager.

Prerequisites:

  • Minimum Android SDK: 23 (Android 6.0)
  • Target API: 35
  • Minimal AdMob version: 23

1. Installation

Current published version: 2.0.6.

build.gradle
dependencies {
implementation("com.bidease:bidease-mobile:2.0.6")
implementation("com.bidease:admob-adapter:2.0.6")
}
warning

Always use the latest available SDK version from Bidease.

2. Initialization

2.1. Getting your App Key

Your App Key is available in the Bidease Monetize dashboard:

  1. Log in to your account at monetize.bidease.com
  2. Go to Applications
  3. Open the required application
  4. Copy the App Key

App Key location in the Monetize dashboard

2.2. SDK Initialization

Before initializing Google Mobile Ads, set your Bidease app key:

import com.bidease.ads.adapter.admob.BideaseMediationAdapter
import com.bidease.mobile.PrivacyParams

BideaseMediationAdapter.setAppKey(
"YOUR_APP_KEY",
PrivacyParams(/* see Privacy & Consent */),
mapOf("ipv4" to "203.0.113.17")
)
warning
Replace YOUR_APP_KEY with the App Key from your Bidease Monetize dashboard.
note

setAppKey accepts optional PrivacyParams and customProps. Use the single-argument overload setAppKey("YOUR_APP_KEY") if you don't need either. See Privacy & Consent for details.

import com.google.android.gms.ads.MobileAds

MobileAds.initialize(context)

The Bidease SDK initializes automatically when AdMob triggers the mediation adapter — no need to call BideaseMobile.init() separately.

3. Add Custom Events in AdMob Mediation

note

Before setting up custom events in AdMob, make sure your app and placements are registered in the Bidease Monetize dashboard. Placement names must match exactly.

Custom events are created directly inside a mediation group. For a full overview, see the AdMob Custom Events documentation.

  1. Go to admob.google.com and click Mediation in the left sidebar
  2. Select an existing mediation group or click Create mediation group
  3. In the Waterfall ad sources table, click Add custom event
  4. Enter a Label using the format AdFormat_ecpm_X.X — where AdFormat is the format type (Banner, Interstitial, Rewarded) and X.X is the floor price
    • Example: Interstitial_ecpm_1.3, Banner_ecpm_0.5
  5. Set the eCPM to the same floor price value as in the label
  6. Click Continue
  7. Fill in the mapping fields:
FieldValue
Class Namecom.bidease.ads.adapter.admob.BideaseMediationAdapter — the same for all ad formats
ParameterAdFormat_ecpm_X.X — must exactly match the Label from step 4
  1. Click Done, then Save
tip

You can create multiple custom events with different floor prices for the same ad format to optimize your waterfall performance.

Privacy signals and custom props are passed through to the Bidease SDK when the adapter initializes it. Use the three-argument setAppKey overload shown above, or update signals at runtime via BideaseMobile.setPrivacyParams(...) / setCustomProps(...) after the adapter has initialized the SDK.

import com.bidease.mobile.PrivacyParams

val privacyParams = PrivacyParams(
coppaEnabled = true,
subjectToGdpr = true,
subjectToCoppa = false,
usPrivacyString = "1YNN",
gppString = "DBACNYA~CPXxRfAPXxRfAAfKABENB-CgAAAAAAAAAAYgAAAAAAAA~1YNN",
gppSid = listOf(2, 6),
userConsentString = "CPXxRfAPXxRfAAfKABENB-CgAAAAAAAAAAYgAAAAAAAA",
subjectToLgpd = true
)
FieldTypeDescription
coppaEnabledBooleanEnable COPPA compliance
subjectToGdprBoolean?Subject to GDPR
subjectToCoppaBoolean?Subject to COPPA
usPrivacyStringString?IAB US Privacy string (e.g. "1YNN")
gppStringString?IAB GPP consent string
gppSidList<Int>?GPP section IDs
userConsentStringString?IAB TCF consent string
subjectToLgpdBoolean?Subject to Brazilian LGPD

5. Test Mode

Option 1: Enable via Code

Add the test mode dependency:

build.gradle
dependencies {
implementation("com.bidease:bidease-mobile:2.0.6")
implementation("com.bidease:admob-adapter:2.0.6")
implementation("com.bidease:bidease-mobile-test-mode:2.0.6")
}

Option 2: Enable via Dashboard

  1. Go to Applications and open the required app
  2. Navigate to Test Devices and add the devices you want to test on — use GAID (Android Advertising ID)
  3. Enable Test for the application

QA Checklist

Read before shipping
  • Test Mode provides nearly 100% fill — expected behavior for QA only.
  • Disable Test Mode before submitting your app to Google Play.
  • Ensure GAID is available on your test device so the Bidease team can review logs.
  • If you run into any issues, contact your Bidease account manager.