AdColony

This guide is intended for publishers who want to use the Google Mobile Ads SDK to load and display ads from AdColony through Open Bidding or waterfall mediation. It covers how to add AdColony ads to an ad unit's mediation configuration, and how to integrate the AdColony SDK and adapter into an AIR app.

Step 1: Set up AdColony

Sign up or log in to your AdColony account. Add your app to the AdColony publisher dashboard by clicking the Setup New App button.

Continue following the guide on the AdMob site:

Step 2: Configure mediation settings for your AdMob ad unit

Step 3: Import the AdColony SDK and adapter ANE

The com.distriqt.admob.AdColony ANE includes the AdColony SDK and the AdMob AdColony mediation adapter. This is everything you need to get AdColony mediation working in your application.

To add the ANE download it from the repository and add it to your application:

Add the extension id to your application descriptor:

<extensions>
<!-- OTHER EXTENSIONS -->
<extensionID>com.distriqt.admob.AdColony</extensionID>
</extensions>

More information on adding ANEs in this tutorial

Core ANE

Note all our extensions rely on the Core ANE. Even if you are using this mediation adapter with another providers ANEs you must include the Core ANE.

The Core ANE doesn't provide any functionality in itself but provides support libraries and frameworks used by our extensions. It also includes some centralised code for some common actions that can cause issues if they are implemented in each individual extension.

You can access this extension here: https://github.com/distriqt/ANE-Core.

Step 4: Additional code required

Android

Add the following to your manifest additions inside the application tag:

<!-- AD COLONY -->
<activity
android:name="com.adcolony.sdk.AdColonyInterstitialActivity"
android:configChanges="keyboardHidden|orientation|screenSize"
android:hardwareAccelerated="true" />
<activity
android:name="com.adcolony.sdk.AdColonyAdViewActivity"
android:configChanges="keyboardHidden|orientation|screenSize"
android:hardwareAccelerated="true" />

iOS

Add the following to your info additions. If you already have an SKAdNetworkItems then append the dict items to the array.

<key>SKAdNetworkItems</key>
<array>
<dict>
<key>SKAdNetworkIdentifier</key>
<string>4pfyvq9l8r.skadnetwork</string>
</dict>
<dict>
<key>SKAdNetworkIdentifier</key>
<string>6g9af3uyq4.skadnetwork</string>
</dict>
</array>

Also check each ad network partner's documentation for any additional SKAdNetworkIdentifier values that they require:

Step 5: Test your implementation

To enable test ads on AdColony, go to your AdColony dashboard and navigate to Monetization > Apps. Select your Zone for which you would like to enable test ads under the Ad Zones section of your app. Test ads can be enabled by checking Yes to Show test ads only? under the Development section.

Optional steps

EU Consent and GDPR

Under the Google EU User Consent Policy, you must ensure that certain disclosures are given to, and consents obtained from, users in the European Economic Area (EEA) regarding the use of device identifiers and personal data. This policy reflects the requirements of the EU ePrivacy Directive and the General Data Protection Regulation (GDPR). When seeking consent, you must identify each ad network in your mediation chain that may collect, receive, or use personal data and provide information about each network's use. Google currently is unable to pass the user's consent choice to such networks automatically.

The section below shows you how to enable or disable personalized ads for AdColony.

The AdColony adapter provides the AdColony.instance.getAppOptions() method to customize parameters to be sent to AdColony's SDK. Two methods relevant to GDPR on these options are setPrivacyFrameworkRequired() and setPrivacyConsentString(), added in AdColony SDK 4.2.0. The following sample code demonstrates how to pass these parameters to the AdColony adapter, which are then used in AdColony’s initialization method. These options must be set before you initialize mobile ads to ensure they get forwarded properly to AdColony's SDK:

AdColony.instance.getAppOptions()
.setPrivacyFrameworkRequired( AdColonyAppOptions.GDPR, true )
.setPrivacyConsentString( AdColonyAppOptions.GDPR, "1" );

See AdColony’s GDPR implementation details for more information about what values may be provided in these methods.

Permissions

For optimal performance, AdColony recommends adding the following optional permissions to your app's manifest additions:

<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.VIBRATE" />

Further information

See the Google AdColony Mediation guide:

https://developers.google.com/admob/android/mediation/adcolony