AATKit Android Integration
Release Notes
  • Start
    • Setup
      • Maven
      • Prerequisites
      • Google Family Safe Apps
    • Initialization
    • Consent
      • General Handling
      • Managed Consent
        • Google CMP
        • Sourcepoint CMP
        • SFBX (AppConsent) CMP
      • Vendor Consent
      • Simple Consent
    • Plugins documentation
    • Additional Information
  • Formats
    • Introduction
    • Banner
      • Auto Load Banner
      • Multi-Size Auto Load Banner
      • Banner Cache
      • Infeed Banner
      • Sticky Banner
      • Multi-Size Banner
    • Fullscreen (Interstitial)
    • AppOpen (Google)
    • Rewarded Video
      • Server-Side Verification (SSV)
    • Native Ad
      • Basic Integration
      • Network Specifics
        • Native Ads: Google
        • Native Ads: ApplovinMax
        • Native Ads: Bluestack
        • Native Ads: FacebookAudienceNetwork
        • Native Ads: Huawei
  • Ad Networks
    • Customize Ad Networks
    • Google Mobile Ads SDK
    • AppLovinMax Ad Review
    • AppNexus special settings
    • FeedAd Shutter Colour and Disabling Spinner
    • Kidoz
  • Advanced
    • Targeting
      • Key-Value Targeting
      • User Targeting
      • Content Targeting URL
    • Frequency Capping
    • Advanced Listeners
      • Reports Delegate
      • Impression Listener (ILRD)
      • Statistics Listener
    • AATKit's Size
    • Ad Space and Fill Rate
    • Shake Debug
    • Child-directed Support
    • Geo Tracking
    • Disabling Ad Networks
    • Huawei Support
    • Creatives History
  • Other
    • AdMob Custom Events
    • Reference
      • Classes
        • AATKit
        • AATKitUserTargeting
        • CollapsibleBannerOptions
        • AATKitDebugScreenConfiguration
        • PlacementDebugInfo
        • AATKitDebugInfo
        • AATKitConfiguration
        • AATKitRuntimeConfiguration
        • ManagedConsent
        • VendorConsent
        • SimpleConsent
        • BannerConfiguration
        • BannerRequest
        • BannerCacheConfiguration
        • AATKitReward
        • NativeAdRating
        • AATKitImpression
        • PriceInfo
        • AdInfo
        • RewardedAdSSVInfo
        • PlacementHistoryInfo
        • AATKitAdNetworkOptions
          • SuperAwesomeOptions
          • FeedAdOptions
          • AppNexusOptions
          • AdMobOptions
          • DFPOptions
      • Interfaces
        • CacheStatusDelegate
        • AATKit.Delegate
        • BannerCache
        • BannerRequestCompletionListener
        • ManagedConsentDelegate
        • VendorConsentDelegate
        • Placement
        • StickyBannerPlacement
        • StickyBannerPlacementListener
        • MultiSizeBannerPlacement
        • MultiSizeBannerPlacementListener
        • InfeedBannerPlacement
        • InfeedBannerPlacementListener
        • BannerRequestDelegate
        • CacheDelegate
        • FullscreenPlacement
        • FullscreenPlacementListener
        • AppOpenAdPlacement
        • AppOpenPlacementListener
        • RewardedVideoPlacement
        • RewardedVideoPlacementListener
        • NativeAdPlacement
        • NativePlacementListener
        • NativeAdData
        • AutoLoadBannerPlacement
        • AutoLoadBannerPlacementListener
        • AutoLoadMultiSizeBannerPlacement
        • AutoLoadMultiSizeBannerPlacementListener
        • ReportsDelegate
        • ImpressionListener
        • StatisticsListener
      • Enumerations
        • AATKitGender
        • AdNetwork
        • ManagedConsentState
        • NonIABConsent
        • BannerPlacementSize
        • BannerSize
        • MediationType
        • ImpressionPricePrecisionType
  • Samples
Powered by GitBook
On this page
  • Introduction
  • How AATKit Google Mediation Adapter works:
  • Setup
  • Integration instructions
  1. Other

AdMob Custom Events

Introduction

  • Requires the AATKit version 3.2 or later.

  • AATKit supports AdMob custom events for banners, fullscreen ads, rewarded videos and native ads. This allows publishers integrating AdMob to receive ads from AATKit.

How AATKit Google Mediation Adapter works:

  • Publishers must prepare their AdMob dashboard adding custom events to their mediation

  • AATKit mediation adapter implements AdMob custom events delegates

  • AATKit mediation adapter internally calls AATKit whenever GoogleMobileAds asks for an ad request (that happens when the publisher request an ad through GoogleMobileAds)

  • When AATKit responds, AATKit mediation adapter notifies the GoogleMobileAds with the request result using the AdMob custom events delegate methods

Setup

First of all, you will need to add the AATKit's repository to your repositories list. Edit your main build.gradle file:

allprojects {
    repositories {
        google()
        jcenter()
        //... other repositories you use
        maven {
            url 'https://android-sdk.aatkit.com/maven/'
        }
    }
}

Next add AATKit Google Mediation Adapter dependency to the build.gradle file. Please note the version of adapter corresponds to the used version of AATKit SDK.

dependencies {
    //... other dependencies you use
    implementation 'com.intentsoftware.addapptr:AATKitGoogleMediationAdapter:<AATKit_VERSION>'
}

Integration instructions

  1. In the AdMob dashboard, click on mediation on the left menu

  2. Create a new mediation for each ad format (Don't forget to choose the proper ad unit that you are using in your application in the GoogleMobileAds integration)

  3. Open the newly created mediation and add a custom event

  4. Edit the custom event and add the proper class name from the following:

    • Banner class name: com.intentsoftware.addapptr.aatkitgooglemediationadapter.AddapptrEventBanner

    • Interstitial class name: com.intentsoftware.addapptr.aatkitgooglemediationadapter.AddapptrEventInterstitial

    • Rewarded video class name: com.intentsoftware.addapptr.aatkitgooglemediationadapter.AddapptrEventRewarded

    • Native ads class name: com.intentsoftware.addapptr.aatkitgooglemediationadapter.AddapptrEventNativeAd

  5. Integrate with GoogleMobileAds different ad formats following their documentation

  6. Handle activity lifecycle by using AATKitAdmobAdapter public methods:

Notify about activity resume

@Override
protected void onResume() {
    super.onResume();
    AATKitAdmobAdapter.resume(this);
}
override protected fun onResume() {
    super.onResume()
    AATKitAdmobAdapter.resume(this)
}

Notify about activity pause

@Override
protected void onPause() {
    AATKitAdmobAdapter.pause(this);
    super.onPause();
}
override protected fun onPause() {
    AATKitAdmobAdapter.pause(this)
    super.onPause()
}

Last updated 6 months ago