This repository centralizes all Android Display SDK8 mediation adapters, serving ads from third party SDKs through Equativ SDK acting as primary integration.
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'} |
You can still install the adapters manually if needed:
-
First make sure you have installed the Equativ Display SDK. More information here.
-
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.
-
Make sure to integrate the SDK corresponding to the chosen adapter(s).
-
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.