MediationAdapter | Android Developers

Quicknav Quicknav
Links

- Google Play Developer Console
- Android Developers Blog
- About Android

Android Sites

- Android.com
- Android Developers
- Android Open Source Project

Language
close

- - About
  - Wear
  - TV
  - Auto
- - Get Started
  - Devices
  - Style
  - Patterns
  - Building Blocks
  - Downloads
  - Videos
- - Training
  - API Guides
  - Reference
  - Tools
  - Google Services
  - Samples
- - Google Play
  - Essentials
  - Get Users
  - Engage & Retain
  - Monetize
  - Analyze
  - Tools & Reference
  - Developer Stories

## Results

Loading...
Summary: Methods | [Expand All]
public interface

# MediationAdapter

com.google.android.gms.ads.mediation.MediationAdapter

Known Indirect Subclasses MediationBannerAdapter, MediationInterstitialAdapter
MediationBannerAdapter | Adapter for third party ad networks that support banner ads.
MediationInterstitialAdapter | Adapter for third party ad networks that support interstitial ads.

## Class Overview

Adapter for third party ad networks.

This class is the common interface of `MediationBannerAdapter` and `MediationInterstitialAdapter` and it defines common methods. There is no reason to implement this interface directly. Instead, adapters should implement `MediationBannerAdapter` and `MediationInterstitialAdapter`.

## Summary

Public Methods
abstract void | onDestroy() Tears down the adapter control.
abstract void | onPause() Called when the application calls `onPause` on the `AdView`.
abstract void | onResume() Called when the application calls `onResume` on the `AdView`.

## Public Methods

#### public abstract void onDestroy ()

Tears down the adapter control.

This is called at the end of the mediator's life cycle. The adapter is expected to release any resources and shut down. After this method is called, any subsequent calls to any other method on this adapter may throw an `IllegalStateException`.

This method is not guaranteed to be called. There are a number of reasons that this method can be skipped, such as a force close of the application.

#### public abstract void onPause ()

Called when the application calls `onPause` on the `AdView`. The adapter is expected to pause any processing associated with the ad being shown.

#### public abstract void onResume ()

Called when the application calls `onResume` on the `AdView`. The adapter is expected to resume any processing associated with the ad being shown.