Admob Mediation - pubnative/pubnative-hybid-android-sdk Wiki

To use HyBid SDK directly in Admob Mediation you will need to integrate the Google Ads SDK and the Hybid SDK into your app.

Integrate Admob SDK

To integrate Admob SDK into your app you should follow the instructions in their website.

Integrate HyBid SDK

To integrate the HyBid SDK follow the instruction in the integration page.

You also need to import the Admob Adapters module from the HyBid SDK:

implementation 'net.pubnative:hybid.sdk:2.16.0'
implementation 'net.pubnative:hybid.adapters.admob:2.16.0'

Code sample

You can find a demo app with code samples for this type of integration here.

Set up the placements on Admob Dashboard

To set up the HyBid Adapters in the Admob mediation you need to follow a few steps.

If you already have an app and ad units created then you can skip these steps.

Create app

Create a new app in the Admob Dashboard

If your app is published you can look it up using the package name from the Play Store.

Otherwise just enter the basic information on the dialog.

Use the app ID you are given to initialize the Admob SDK on the app's AndroidManifest.xml file as specified in the documentation.

Create banner ad unit

Create a new ad unit and set up the format as Banner

In Admob, Banner, Medium Rectangle and Leaderboard are all considered Banners. therefore you use the same type of ad unit for all of them and you specify the size on the app following the Admob documentation instructions.

After this step, you will obtain an Ad Unit Id. Use this to request ads for this placement.

Create interstitial ad unit

Create a new ad unit and set up the format as Interstitial

After this step, you will obtain an Ad Unit Id. Use this to request ads for this placement.

Create Rewarded ad unit

Create a new ad unit and set up the format as Rewarded

After this step, you will obtain an Ad Unit Id. Use this to request ads for this placement.

Set up Mediation for the app

Head over to the mediation section to set up the adapters for HyBid SDK.

Create Mediation Group

Create a mediation group for each placement format you want to use PubNative Admob adapter in.

Select ad units

On the Ad units section of the mediation group, click on the Add ad units button to start choosing which placements you want to include this mediation group.

Remove automatic eCPM (optional)

If you want to guarantee that your adapters are going to be called before the Admob network, you should remove the Real Time eCPM and set a price lower than the floor price of your adapters.

This is not recommended since Admob Network might have higher eCPMs in some cases

Create custom event

To create the custom events for the adapters in the mediation group, head over to the Ad Sources section and click on the Add Custom Event button

Choose a name for the custom event that easily identifies that it's a PubNative adapter.

On the class name, enter the full name of the adapter you want to use, including the package name.

In this example we are setting up the banner adapter. You can see below the full list of adapters per ad format.

On the parameter section, you should add the JSON you can find below the list of adapters. Make sure to use the proper app token and zone id that will serve the specific ad size you will be requesting.

Insert for each format the following custom event names and params:

Custom event for Banner:


Custom event for Medium:


Custom event for Leaderboard:


Custom event for Interstitial:


Custom event for Rewarded:


Custom event for Native:


Parameters to set up [Example]:

    "pn_app_token": "1234567890abcdefghijklmnopqrstuv",
    "pn_zone_id": "1"

After setting up your ad sources. you should be able to see the waterfall order for the selected ad units

Request ads

Ads should be requested using the regular Admob process using the generated Ad Unit Ids. You can find the intructions in the Admob developers page.


Please note: to complete implementation, the HyBid SDK needs to be initialized. Follow the HyBid integration guide and complete this step.

<- MoPub Mediation