Integrating a new ad network SDK

As seen in the Overview section the mediation component of the Smart Display SDK v7.0.0 is now extensible, allowing the publishers to integrate third-party ad networks by implementing their own mediation adapters.

  1. Implement a custom mediation adapter
  2. Use the In-App Mediation Custom Adapter template

Implement a custom mediation adapter

The Smart Display SDK cannot use a third party SDK directly.

It must instead call an intermediate component called an adapter that will be responsible of retrieving an ad from the third party SDK. This adapter will then forward the ad to the Smart Display SDK.

SmartSDK / Third Party SDK with intermediate Adapter

Creating a custom adapter is done by implementing an interface (Android) or a protocol (iOS) depending of the type of ad you want to deliver:

  • SASMediationBannerAdapter for a banner,
  • SASMediationInterstitialAdapter for an interstitial,
  • SASMediationRewardedVideoAdapter for a rewarded video,
  • SASMediationNativeAdAdapter for a native ad.

For more information about how to implement thoses interfaces/protocols on each platform, please refer to the dedicated page:

In-App Mediation Custom Adapter template

On Smart Manage programming interface, when you program a mediation insertion for a specific ad network, you must select the In-App Mediation Custom Adapter template.

Using this template, you will have to fill-out 4 mandatory fields:

  • SDK Name

    The name of the third-party SDK you will use with your custom adapter.

  • Format Type

    The ad format type that will be delivered by this insertion. This will ensure the compatibility between this format type and the format type expected by the SDK. Only 4 possibilities:

    • Banner
    • Interstitial
    • Rewarded video
    • Native ad

  • Adapter class

    The name of the adapter class. The Smart Display SDK will use that class name to dynamically instantiate the mediation adapter, so be careful to correctly type it.
    Please note that on Android the full name of a class includes the package name.

  • Placement info

    A string containing the parameters needed by the third-party SDK to make the ad call (usually placement ID, application ID, or similar). This string will be passed as is to the mediation adapter instance (of class specified above). It is therefore up to the publisher to decide of a String representation for those parameters (comma separated, slash separated, or even a JSON String) and implement the mediation adapter accordingly to properly extract them.


Example: