Implement a custom mediation adapter on Android

This page is focused on how to create a custom mediation adapter on your own. For more general information about the mediation and the mediation adapters provided out of the box, please check the Supported Ad Networks article.

Table of contents

  1. Overview
  2. Mediation adapter interfaces
  3. Mediation adapter listener interfaces
  4. Set up your insertion on Equativ Management Platform (EMP)
  5. Implementation samples

Overview

The Equativ Display SDK can not use a third-party SDK directly.

It must instead rely on an intermediate component called an mediation adapter that will be responsible of retrieving an ad from the third-party SDK. This adapter will then forward the ad to the Equativ Display SDK via its mediation adapter listener.

Mediation adapter interfaces

Creating a custom adapter is done by implementing an interface depending on the type of ad you want to deliver:

Please follow the API documentation to know which APIs must be implemented for each mediation adapter interface.

Mediation adapter listener interfaces

When implementing an mediation adapter, you will receive an instance of a specific mediation adapter listener interface through the loading API of your mediation adapter.

This listener object acts as a callback that will notify the Equativ Display SDK of the third-party SDK lifecycle events.

You must call these methods depending on the event occuring on the third-party SDK side. Failing to do so, therefore failing to notify , might break either the mediation waterfall, the impression counting or any other kind of tracking.

Please check the API documentation to have more information about when to call these mediation adapter listener methods, depending on the ad format of your mediation adapter:

Set up your insertion on Equativ Management Platform (EMP)

Please check the “Integrate new ad network” article to learn more about this part.

Implementation samples

Equativ provides open source adapters for some common third-party SDKs. You can use them as implementation samples for your own custom adapter.

Open source mediation adapters


Back to top

Copyright Equativ © 2024. All right reserved.

Page last modified: Nov 13 2024.