Android Mediation

Android Google Ad Manager Adapter

Android Google Ad Manager (GAM) Mediation Adapter supports all ad units.

Google Ad Manager/ ad units mapping:       GAM
 mceclip29.png          Interscroller    Banner                format-banner.svg
 mceclip33.png Headline    Banner                format-banner.svg
 mceclip34.png Interstitial    Interstitial                format-interstitial.svg
 mceclip31.png Infeed    Banner                format-banner.svg
 mceclip32.png Medium Rectangle    Banner                format-banner.svg
 mceclip30.png Banner    Banner                format-banner.svg


To set it up:

1. Add the adapter to your project:

Edit your project’s build.gradle file in order to declare our maven repository:

 repositories {
    maven { url "" }

Add the following dependencies to your app-module’s build.gradle file:

implementation ‘’
implementation ‘'

Follow guide to initialize DisplayIO SDK.


2. Create a new Yield Group (Banner) and add Third-Party Yield Partner (DisplayIO) to the Yield Group. If you require more instruction on this please consult the link below:


3. Define a Custom Banner Event using the following guide:

Update to the following settings:



For each ad unit use Class Name:

  • Interstitial ad unit:
  • Infeed ad unit:
  • Interscroller ad unit:
  • Banner ad unit: 
  • Medium Rectangle ad unit:
  • OutStreamVideo ad unit: 

and Parameter <PLACEMENT_ID>, where PLACEMENT_ID is your placement ID on platform ( Publisher Portal).


4. Create a new ad unit and specify the newly created network as a source. Disable auto-refreshing for banner.


5. Make sure that DisplayIO network has a higher priority than any other sources (usually Google adds its own source by default).


6. Use Banner or Interstitial tutorials to get ads from Google Ad Manager.


7. Infeed can be added in RecyclerView by passing it as adapter’s constructor argument:

RecyclerViewAdapter( ... , @NonNull AdView adView) {


    this.adView = adView;


and can be shown in particular position with help of RecyclerView.ViewHolder subclass in RecyclerView.Adapter.onCreateViewHolder method:


static class AdHolder extends RecyclerView.ViewHolder {
   AdHolder(View itemView) {


public RecyclerView.ViewHolder onCreateViewHolder(@NonNull final
ViewGroup parent, int viewType) {


   return new AdHolder(adView);


9. Interscroller could be added in RecyclerView like Banner but it require additional step: Set up your placement with field to store reference to parent (RecyclerView object) Make sure you call it after DisplayIO SDK has beed initialized:

try {
    InterscrollerPlacement placement = (InterscrollerPlacement) Controller
} catch (DioSdkException e) {


Disabling auto impression tracking for Interscroller is strongly recommended to avoid discrepancies between Ad Manager and DisplayIO metrics.

PublisherAdRequest adRequest = new PublisherAdRequest.Builder()

In order to count the impression you should listen onAdOpened() on your PublisherAdView:

public void onAdOpened() {

Still have Questions?

Contact Us