adcolony.*

Type Library
Revision 2017.3060
Keywords ads, advertising, AdColony
Platforms Android, iOS

Overview

The AdColony plugin allows developers to monetize users through AdColony video interstitial and rewarded video ads.

The AdColony plugin is only available to users who have purchased the Corona Professional Bundle or the AdColony plugin. This plugin lets you keep 100% of your ad revenue and allows you to manage your account/settings with AdColony directly.

Due to recent Android dependency updates, this plugin requires daily build 2016.3005 or later.

Registration

Before you can use this plugin, you must register with AdColony.

Syntax

local adcolony = require( "plugin.adcolony" )

Functions

Events

Project Settings

To use this plugin, add an entry into the plugins table of build.settings. When added, the build server will integrate the plugin during the build phase.

settings =
{
    plugins =
    {
        ["plugin.adcolony"] =
        {
            publisherId = "com.coronalabs"
        },
    },
}

iOS

If your app is for iOS, you must also include the following code in build.settings to ensure that AdColony functions as intended:

settings = {
 
    iphone =
    {
        plist =
        {
            MinimumOSVersion = "7.0",
            LSApplicationQueriesSchemes =
            {
                "fb",
                "instagram",
                "tumblr",
                "twitter"
            },
            NSCalendarsUsageDescription = "This app would like to add events to the calendar.",
            NSPhotoLibraryUsageDescription = "This app would like to access the photo library.",
            NSCameraUsageDescription = "This app would like to access the camera.",
            NSMotionUsageDescription = "This app would like to use interactive ad controls."
        }
    }
}

Important

If building for iOS, you must bypass App Transport Security (ATS) by adding the following to the plist table of build.settings. While Corona Labs does not blindly encourage this approach for all developers and projects, bypassing ATS is required in certain cases. For more information on ATS, please see the Managing App Transport Security guide.

settings =
{
    iphone =
    {
        plist =
        {
            NSAppTransportSecurity = { NSAllowsArbitraryLoads=true },
        },
    },
}

Android

Important

For Android, you should remove any legacy inclusion of the ["plugin.google.play.services"] plugin from your build.settings.

Note

For Android, the following permissions/features are automatically added when using this plugin:

  • "android.permission.INTERNET"
  • "android.permission.ACCESS_NETWORK_STATE"
  • "android.permission.WRITE_EXTERNAL_STORAGE"

In addition, you can add the following optional permissions:

  • "android.permission.VIBRATE"

Support