Mediating Facebook

This guide explains how you can mediate AdMob as an SDK Mediation partner.

SDK Mediation Intro

SDK mediation enables you to mediate owned third-party SDK ad partners. In order to do this, you simply need to integrate the Smaato SDK as well as the respective third party SDK as described below. Finally, you will also need to configure your ad partner mediation inside of your SPX account via the “Networks” tab.

Initializing

All libraries need to be explicitly initialized.

Please consult the corresponding Facebook initialization guides for Android and/or iOS.

Android Initialization

iOS Initialization

Android Mediation

First, add the following lines to your project-level build.gradle file.

implementation('androidx.annotation:annotation:1.0.0')
implementation('com.facebook.android:audience-network-sdk:6.+')

Then add the following lines to your AndroidManifest.xml file:

<!--Facebook Audience Network Interstitial -->
<activity android:name="com.facebook.ads.InterstitialAdActivity"
    android:configChanges="keyboardHidden|orientation|screenSize" />
<!--Facebook Audience Network NativeAd-->
<activity android:name="com.facebook.ads.NativeAdVideoActivity"
    android:configChanges="keyboardHidden|orientation|screenSize" />

Facebook and Proguard Configuration

If you are using Proguard in your project, consider adding the following lines to your Proguard config file.

-keep class com.facebook.ads.** { *; }
-keep class com.facebook.** { *; }

Inside the ZIP file, you will find Smaato’s supported certified SDK mediation adapters, which contain “CSM”.

  1. To add Facebook, add the respective Facebook adapters, as well as the Facebook SDK.
  2. To add a Custom SDK Network: Append your custom network class to the SOMAMediationPlugin class, and define your public method with a parameter to receive the data (JSON) you defined in your SPX custom SDK network line item.

iOS Mediation

Inside the ZIP file, you will find Smaato’s supported certified SDK mediation adapters, which contain “CSM”.

  1. To add Facebook, add the respective Facebook adapters, as well as the Facebook SDK.
  2. To add a Custom SDK Network: Append your custom network class to the SOMAMediationPlugin class, and define your public method with a parameter to receive the data (JSON) you defined in your SPX custom SDK network line item.
  3. If you want to mediate interstitial ads, please override the presentInterstitial method and implement your preferred Interstitial presentation method.

Last Modified: November 6, 2021 at 1:22 am


© 2005-2020 Smaato, Inc. All Rights Reserved. Smaato® is a registered trademark of Smaato, Inc.

Privacy Policy | Cookie Policy | Support