Skip to content

Latest commit

 

History

History
59 lines (39 loc) · 3.79 KB

File metadata and controls

59 lines (39 loc) · 3.79 KB

Equativ Mediation Adapters Android

This repository centralizes all Android Display SDK8 mediation adapters, serving ads from third party SDKs through Equativ SDK acting as primary integration.

Automatic Gradle installation

You can install the Equativ Display SDK, one or several mediation adapters and their related third party SDKs using Gradle.

First declare the Equativ repository in the main build.gradle file of your project. Also add any other Maven repository that might be required by a third party SDK (see table below).

allprojects {
  repositories {
    google()
    jcenter()

    // add the Equativ repository
    maven { url 'https://packagecloud.io/smartadserver/android/maven2' }

    // add other third party repositories if necessary (see table below)
    // …
  }
}

Then in the build.gradle of to your application module, you can now import the adapters you need. Any dependency will be automatically fetched (Equativ Display SDK, third party SDK, …).

For instance you can import Google and Ogury as follows:

implementation('com.equativ.android.mediation:equativ-display-sdk-with-google:8.2.0.0')
implementation('com.equativ.android.mediation:equativ-display-sdk-with-ogury:8.2.0.0')

Note on version numbers:

The latest version is: 8.2.0.0

If you import several third party adapters using Gradle, you must use the same version number for all of them.

The version number always correspond to the underlying Equativ Display SDK for its first three digits, then a technical version corresponding to the adapters. For instance, 8.2.0.1 would import the first technical release of the adapters with the Equativ Display SDK 8.2.0.

Available adapters are:

Package name Supported SDK version Comments Maven repository
equativ-display-sdk-with-googlemobileads 23.1.0 n/a n/a
equativ-display-sdk-with-ogury 5.6.2 n/a maven {url 'https://maven.ogury.co'}

Manual installation

You can still install the adapters manually if needed:

  1. First make sure you have installed the Equativ Display SDK. More information here.

  2. Copy and paste the classes of the adapter(s) you need to your project sources. Note that some adapter classes have a base class, do not forget to copy it as well. Beware of the fact that the adapter classes are located in a folder structure consistent with their declared package names and the class name sent in the mediation ad sent by Equativ delivery. For the whole mediation flow to work properly, you must leave this folder structure untouched when copying it in your project. Typically, you should copy the com/ root folder containing the classes directly in one of the source folders of your Android project, for instance src/main/Java. If that com/ folder already exists, simply merge it with the one containing the adapters. Failing to do so will prevent the SDK from properly instantiating the adapters when it receives a mediation ad, and the ad call will then fail.

  3. Make sure to integrate the SDK corresponding to the chosen adapter(s).

  4. If you are building your application with the minifiedEnable true option, which usually obfuscates classnames, you must add a proguard rule (or equivalent) to your build pipeline to ensure that the adapter classes you imported remain untouched. Indeed, they are instantiated via reflection by the Equativ Display SDK and obfuscating them would prevent them from being used when mediation ads are fetched. Please refer to each dedicated README.me per SDK folder to get the proguard rule to add to your build configuration.