RTBSDK Android Integration
Release Notes
  • Start
    • Setup
      • Maven
      • Configure RTBSDK
    • Consent
  • Formats
    • Banner
    • Fullscreen (Interstitial)
    • Native Ads
    • Advanced
      • Separate Loading and Rendering of Banner Ads
  • Other
    • AppLovin Custom Adapter
    • AdMob Custom Events
    • Reference
      • Classes
        • RTBSDKManager
        • RTBBannerView
        • RTBBannerAdProvider
        • RTBBannerRequestConfiguration
        • RTBBannerSize
        • RTBFullscreenAd
        • RTBFullscreenRequestConfiguration
        • RTBBidInfo
        • RTBNativeAd
        • RTBNativeAdRequestConfiguration
        • RTBUserTargeting
        • RTBNativeAdLoader
      • Interfaces
        • RTBBannerViewDelegate
        • RTBBannerAdLoadDelegate
        • RTBBannerAdInteractionDelegate
        • RTBFullscreenDelegate
        • RTBNativeAdLoadDelegate
        • RTBNativeAdInteractionDelegate
      • Enumerations
        • RTBGender
  • Sample App
Powered by GitBook
On this page
  • Summary
  • How GraviteRTBAdMobMediationAdapter Works
  • Integration steps
  1. Other

AdMob Custom Events

PreviousAppLovin Custom AdapterNextReference

Last updated 4 months ago

AdMob Custom Event is supported from version 1.5.0

Summary

GraviteRTBAdMobMediationAdapter is a Gravite framework that implements . It supports the following ad formats:

  • Banners

  • Fullscreen

  • Native Ads

How GraviteRTBAdMobMediationAdapter Works

  • Publishers must prepare their AdMob dashboard by adding custom events to their mediation (See Google instructions ).

  • GraviteRTB Mediation Adapter Implements AdMob custom events delegates.

  • The publisher requests an ad (Banner, Fullscreen or NativeAd) from GoogleMobileAds (To learn how to request an ad from GoogleMobileAds, please visit ).

  • GoogleMobileAds internally calls GraviteRTB Mediation Adapter asking for an ad.

  • GraviteRTB Mediation Adapter internally calls RTBSDK asking for an ad.

  • When RTBSDK responds, GraviteRTB Mediation Adapter will notify GoogleMobileAds with the response using the AdMob custom events delegate methods. And in return, GoogleMobileAds will notify you of the response using the normal GoogleMobileAds callback.

Integration steps

Step 1: Set Up Mediation in the AdMob Dashboard

  • Log in to your AdMob dashboard and navigate to "Mediation" in the left menu.

  • Create a new mediation group for each ad format you plan to use.

    • Ensure you select the correct ad unit used in your application during the GoogleMobileAds integration.

  • Open the newly created mediation group and add a Custom Event.

  • Edit the custom event and specify the appropriate class name for your ad format:

    • Banner ads: com.admob.mediation.adapters.RTBSDKBannerMediationEvent.

    • Interstitial ads: com.admob.mediation.adapters.RTBSDKInterstitialMediationEvent.

    • Native ads: com.admob.mediation.adapters.RTBSDKNativeAdMediationEvent.

  • In the "Mediation" section under the "Waterfall Sources" tab, click on "Manage Mapping" and add the following data to the "Parameter" field:

    • {"bundleId": "<bundle_id>", "placementId": <integer_placement_id>, "sellerId": "<seller_id>"}.

    • Replace <bundle_id>, <integer_placement_id>, and <seller_id> with the appropriate values for your app.

    • This data is used by the Gravite RTBSDK to load ads:

      • bundleId and placementId are required.

      • sellerId is optional.

Step 2: Add Gravite AdMob Mediation Adapter

  • Integrate GraviteRTB AdMob MediationAdapter:

    • Edit your main build.gradle file, adding necessary repository:

      allprojects {
          repositories {
              google()
              mavenCentral()
              //... other repositories you use
              maven {
                  url 'https://android-sdk-rtb.gravite.net/maven'
              }
          }
      }

    • Integrate RTBSDK AdMob Mediation Adapter

      To add RTBSDK AdMob Mediation Adapter add the following dependency in your app's build.gradle file:

      dependencies {
          //... other project dependencies
          implementation ('com.rtb.sdk:RTB-SDK-AdMobMediationAdapter:<SDK_VERSION>') {
              transitive = true
          }
      }

Step 3: Integrate Google Ad Formats

Follow the Google Mobile Ads SDK to integrate the ad formats you wish to use.

AdMob custom events
Add a custom event
Google’s documentation
documentation