Wiki

Clone wiki

Adobe Air Plugin / Home

Overview

The aatkit plugin offers easy integration of mobile ad networks. AddApptr gives you access to all the networks with one single SDK.

Sign Up

To use the AddApptr SDK, please sign up for an account.

Sample application

Changelog

Ad networks version list

Integration instructions

I. Download and unpack AATKit_AdobeAIR.zip.

IIa. Flash Professional:

  1. Create a new AIR project.
  2. Select File -> Publish Settings.
  3. Select the wrench icon next to Script for ActionScript Settings.
  4. Select the Library Path tab.
  5. Press the Browse for Native Extension (ANE) File button and select the AATKitExtension.ane for the main extension and other ANE files for different ad networks, depending on your needs. * Please remember that some ad networks are integral part of aatkit and they don't have separete ANE files.
  6. For android platform Millennial and PubMatic requires additional assets. Please import files from corresponding extension folders into your project assets folder.

IIb. Flash Builder 4.6:

  1. Right-click your project in Package Explorer and select Properties.
  2. Select ActionScript Build Path and click the Native Extensions tab.
  3. Click Add ANE and navigate to the extension folder you've extracted. Select AATKitExtension.ane for the main extension and other ANE files for different ad networks, depending on your needs. * Please remember that some ad networks are integral part of aatkit and they don't have separete ANE files.
  4. Add the extensions to the build target before compiling.
  5. For android platform Millennial and PubMatic requires additional assets. Please import files from corresponding extension folders into your project assets folder.
  • AATKit on Android requires GooglePlayServices to work. Library delivered with AATKit is stripped version of GPS that supports only ads. If you are using other functions from GooglePlayServices, please use other GPS extension with full functionality.

III. Add the extension identifiers to the <extensions> block in application.xml:

#!xml
<extensions>
    <!-- AATKit -->
        <extensionID>com.intentsoftware.addapptr</extensionID>

    <!-- Android networks -->
        <extensionID>com.intentsoftware.addapptr</extensionID>
        <extensionID>com.intentsoftware.addapptr.aatkitandroid</extensionID>
        <extensionID>com.intentsoftware.addapptr.android.googleplayservices</extensionID>
        <extensionID>com.intentsoftware.addapptr.android.supportv4</extensionID>
        <extensionID>com.intentsoftware.addapptr.android.adcolony</extensionID>
        <extensionID>com.intentsoftware.addapptr.android.applovin</extensionID>
        <extensionID>com.intentsoftware.addapptr.android.appnexus</extensionID>
        <extensionID>com.intentsoftware.addapptr.android.criteo</extensionID>
        <extensionID>com.intentsoftware.addapptr.android.facebook</extensionID>
        <extensionID>com.intentsoftware.addapptr.android.flurry</extensionID>
        <extensionID>com.intentsoftware.addapptr.android.inmobi</extensionID>
        <extensionID>com.intentsoftware.addapptr.android.mopub</extensionID>
        <extensionID>com.intentsoftware.addapptr.android.ogury</extensionID>
        <extensionID>com.intentsoftware.addapptr.android.onebyaol</extensionID>
        <extensionID>com.intentsoftware.addapptr.android.smaato</extensionID>
        <extensionID>com.intentsoftware.addapptr.android.smartad</extensionID>
        <extensionID>com.intentsoftware.addapptr.android.unityads</extensionID>

    <!-- iOS networks -->
        <extensionID>com.intentsoftware.addapptr</extensionID>
        <extensionID>com.intentsoftware.addapptr.ios.adcolony</extensionID>
        <extensionID>com.intentsoftware.addapptr.ios.admob</extensionID>
        <extensionID>com.intentsoftware.addapptr.ios.userMessagingPlatform</extensionID>
        <extensionID>com.intentsoftware.addapptr.ios.applovin</extensionID>
        <extensionID>com.intentsoftware.addapptr.ios.appnexus</extensionID>
        <extensionID>com.intentsoftware.addapptr.ios.criteo</extensionID>
        <extensionID>com.intentsoftware.addapptr.ios.facebook</extensionID>
        <extensionID>com.intentsoftware.addapptr.ios.flurry</extensionID>
        <extensionID>com.intentsoftware.addapptr.ios.flurryads</extensionID>
        <extensionID>com.intentsoftware.addapptr.ios.inmobi</extensionID>
        <extensionID>com.intentsoftware.addapptr.ios.millennial</extensionID>
        <extensionID>com.intentsoftware.addapptr.ios.mopub</extensionID>
        <extensionID>com.intentsoftware.addapptr.ios.smaato</extensionID>
        <extensionID>com.intentsoftware.addapptr.ios.smaatomobileappkit</extensionID>
        <extensionID>com.intentsoftware.addapptr.ios.unityads</extensionID>
        <extensionID>com.intentsoftware.addapptr.ios.yandexmobilemetricacrashes</extensionID>
        <extensionID>com.intentsoftware.addapptr.ios.yandexmobileads</extensionID>
        <extensionID>com.intentsoftware.addapptr.ios.yandexmobilemetrica</extensionID>
</extensions>

IIIb. Android

In order to use extension on Android, you'll need to update the manifestAdditions block in your your application.xml file.

Please remember to replace ${applicationId} with your apllication id):

#!java
   <android>
        <manifestAdditions><![CDATA[
            <manifest android:installLocation="auto">

                <uses-permission android:name="android.permission.INTERNET" />
                <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
                <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
                <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
                <uses-permission android:name="android.permission.READ_PHONE_STATE" />
                <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
                <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>

                <application>

                    <!-- ads start -->
                    <!-- Google Play Services -->
                    <meta-data
                        android:name="com.google.android.gms.version"
                        android:value="@integer/google_play_services_version" />

                    <!-- MOPUB("MoPub") -->
                    <activity
                        android:name="com.mopub.mobileads.MoPubActivity"
                        android:configChanges="keyboardHidden|orientation|screenSize" />
                    <activity
                        android:name="com.mopub.mobileads.MraidActivity"
                        android:configChanges="keyboardHidden|orientation|screenSize" />
                    <activity
                        android:name="com.mopub.common.MoPubBrowser"
                        android:configChanges="keyboardHidden|orientation|screenSize" />
                    <activity
                        android:name="com.mopub.mobileads.MraidVideoPlayerActivity"
                        android:configChanges="keyboardHidden|orientation|screenSize" />
                    <activity
                        android:name="com.mopub.mobileads.RewardedMraidActivity"
                        android:configChanges="keyboardHidden|orientation|screenSize" />
                    <activity
                        android:name="com.mopub.common.privacy.ConsentDialogActivity"
                        android:configChanges="keyboardHidden|orientation|screenSize" />

                    <!-- FLURRY("Flurry") -->
                    <activity
                        android:name="com.flurry.android.FlurryFullscreenTakeoverActivity"
                        android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"
                        android:theme="@android:style/Theme.Translucent.NoTitleBar" />
                    <activity
                        android:name="com.flurry.android.FlurryTileAdActivity"
                        android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"
                        android:screenOrientation="portrait"
                        android:theme="@android:style/Theme.Translucent.NoTitleBar" />
                    <activity
                        android:name="com.flurry.android.FlurryBrowserActivity"
                        android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"
                        android:theme="@android:style/Theme.Translucent.NoTitleBar" />

                    <!-- ADMOB("AdMob"), ADX("AdX", "RTB2"), DFP("DFP") -->
                    <activity
                        android:name="com.google.android.gms.ads.AdActivity"
                        android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"
                        android:theme="@android:style/Theme.NoTitleBar" />

                    <!-- FACEBOOK("Facebook") -->
                    <activity
                        android:name="com.facebook.ads.AudienceNetworkActivity"
                        android:configChanges="keyboardHidden|orientation|screenSize" />

                    <!-- ADDAPPTR("House") -->
                    <activity android:name="com.intentsoftware.addapptr.ad.fullscreens.PromoHouseFullscreenActivity" >
                    </activity>

                    <!-- SMARTAD("SmartAdServer") -->
                    <activity
                        android:name="com.smartadserver.android.library.rewarded.SASRewardedVideoActivity"
                        android:configChanges="screenSize|orientation"
                        android:theme="@android:style/Theme.Translucent.NoTitleBar.Fullscreen" >
                    </activity>
                    <activity
                        android:name="com.mopub.common.privacy.ConsentDialogActivity"
                        android:configChanges="keyboardHidden|orientation|screenSize" />
                    <activity android:name="com.applovin.adview.AppLovinConfirmationActivity" />

                    <!-- CRITEO("Criteo") -->
                    <activity
                        android:name="com.intentsoftware.addapptr.ad.fullscreens.CriteoFullscreenActivity"
                        android:configChanges="keyboardHidden|orientation|keyboard|smallestScreenSize|screenSize"
                        android:theme="@android:style/Theme.NoTitleBar.Fullscreen" >
                    </activity>

                    <!-- ADCOLONY("AdColony") -->
                    <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"/>

                    <!-- APPLOVIN("AppLovin") -->
                    <meta-data
                        android:name="applovin.sdk.key"
                        android:value="3aDrZq32AweqJ-omTIS06ckunsd3HNkKzy9WnDZx8DlSCXClqemwGUp2KR5bpqxnn5HXIsSR3CuFk5_TllS0DG" />
                    <activity
                        android:name="com.applovin.adview.AppLovinInterstitialActivity"
                        android:configChanges="orientation|screenSize" />
                    <activity
                        android:name="com.applovin.adview.AppLovinConfirmationActivity"
                        android:configChanges="orientation|screenSize" />

                    <!-- INMOBI("Inmobi") -->
                    <activity
                        android:name="com.inmobi.rendering.InMobiAdActivity"
                        android:configChanges="keyboardHidden|orientation|keyboard|smallestScreenSize|screenSize|screenLayout"
                        android:hardwareAccelerated="true"
                        android:theme="@android:style/Theme.NoTitleBar" />

                    <receiver
                        android:name="com.inmobi.commons.core.utilities.uid.ImIdShareBroadCastReceiver"
                        android:enabled="true"
                        android:exported="true" >
                        <intent-filter>
                            <action android:name="com.inmobi.share.id" />
                        </intent-filter>
                    </receiver>

                    <!-- INNERACTIVE("Inneractive") -->
                    <activity
                        android:name="com.inneractive.api.ads.sdk.InneractiveInternalBrowserActivity"
                        android:configChanges="keyboardHidden|orientation|screenSize|smallestScreenSize|screenLayout" />
                    <activity
                        android:name="com.inneractive.api.ads.sdk.InneractiveInterstitialAdActivity"
                        android:configChanges="keyboardHidden|orientation|screenSize|smallestScreenSize|screenLayout" />
                    <activity
                        android:name="com.inneractive.api.ads.sdk.InneractiveRichMediaVideoPlayerActivity"
                        android:configChanges="keyboardHidden|orientation|screenSize|smallestScreenSize|screenLayout" />

                    <!-- LOOPME("LoopMe") -->
                    <activity
                        android:name="com.loopme.AdActivity"
                        android:alwaysRetainTaskState="true"
                        android:configChanges="orientation|keyboardHidden|screenSize"
                        android:exported="true"
                        android:hardwareAccelerated="true" />
                    <activity android:name="com.loopme.AdBrowserActivity" />
                    <activity
                        android:name="com.loopme.MraidActivity"
                        android:configChanges="orientation|keyboardHidden|screenSize"
                        android:hardwareAccelerated="true" />
                    <activity
                        android:name="com.loopme.mraid.MraidVideoActivity"
                        android:screenOrientation="landscape" />

                    <!-- ONEBYAOL("Millennial", "OneByAOL") -->
                    <!-- <provider
                        android:name="com.millennialmedia.internal.utils.MediaContentProvider"
                        android:authorities="${applicationId}.MediaContentProvider"
                        android:grantUriPermissions="true"
                        android:exported="false" />
                    <activity
                        android:name="com.millennialmedia.internal.MMActivity"
                        android:configChanges="locale|layoutDirection"
                        android:label="@string/mmadsdk_app_name"
                        android:theme="@style/Theme.MMTransparent" />
                    <activity
                        android:name="com.millennialmedia.internal.MMIntentWrapperActivity"
                        android:configChanges="locale|layoutDirection"
                        android:label="sdk" />
                    <service
                        android:name="com.millennialmedia.internal.task.handshake.HandshakeRequestService"
                        android:exported="true"
                        android:permission="android.permission.BIND_JOB_SERVICE" />
                    <service
                        android:name="com.millennialmedia.internal.task.reporting.PlacementReportingService"
                        android:exported="true"
                        android:permission="android.permission.BIND_JOB_SERVICE" />
                    <service
                        android:name="com.millennialmedia.internal.task.geoipcheck.GeoIpCheckRequestService"
                        android:exported="true"
                        android:permission="android.permission.BIND_JOB_SERVICE" />
                    <service
                        android:name="com.millennialmedia.internal.VolumeChangeService"
                        android:exported="false" /> -->

                    <!-- SMAATO("Smaato") -->
                    <activity android:name="com.smaato.soma.interstitial.InterstitialActivity" android:resizeableActivity="false" android:configChanges="keyboardHidden|orientation|screenSize" />
                    <activity android:name="com.smaato.soma.video.VASTAdActivity" android:resizeableActivity="false" android:configChanges="keyboardHidden|orientation|screenSize" />
                    <activity android:name="com.smaato.soma.ExpandedBannerActivity" android:resizeableActivity="false" android:configChanges="keyboardHidden|orientation|screenSize" />

                    <!-- UNITYADS("Unity") -->
                    <activity
                        android:name="com.unity3d.ads.adunit.AdUnitActivity"
                        android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen"
                        android:hardwareAccelerated="true"
                        android:theme="@android:style/Theme.NoTitleBar.Fullscreen" />
                    <activity
                        android:name="com.unity3d.ads.adunit.AdUnitTransparentActivity"
                        android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen"
                        android:hardwareAccelerated="true"
                        android:theme="@android:style/Theme.Translucent.NoTitleBar.Fullscreen" />
                    <activity
                        android:name="com.unity3d.ads.adunit.AdUnitTransparentSoftwareActivity"
                        android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen"
                        android:hardwareAccelerated="false"
                        android:theme="@android:style/Theme.Translucent.NoTitleBar.Fullscreen" />
                    <activity
                        android:name="com.unity3d.ads.adunit.AdUnitSoftwareActivity"
                        android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen"
                        android:hardwareAccelerated="false"
                        android:theme="@android:style/Theme.NoTitleBar.Fullscreen" />

                    <!-- VUNGLE("Vungle") -->
                    <activity
                        android:name="com.vungle.warren.ui.VungleActivity"
                        android:configChanges="keyboardHidden|orientation|screenSize|screenLayout|smallestScreenSize"
                        android:launchMode="singleTop"
                        android:theme="@android:style/Theme.Translucent.NoTitleBar" />
                    <service
                        android:name="com.evernote.android.job.v21.PlatformJobService"
                        android:exported="false"
                        android:permission="android.permission.BIND_JOB_SERVICE" />
                    <service
                        android:name="com.evernote.android.job.v14.PlatformAlarmService"
                        android:exported="false"
                        android:permission="android.permission.BIND_JOB_SERVICE" />
                    <service
                        android:name="com.evernote.android.job.v14.PlatformAlarmServiceExact"
                        android:exported="false" />
                    <receiver
                        android:name="com.evernote.android.job.v14.PlatformAlarmReceiver"
                        android:exported="false" >
                        <intent-filter>
                            <!-- Keep the filter for legacy intents -->
                            <action android:name="com.evernote.android.job.v14.RUN_JOB" />
                            <action android:name="net.vrallev.android.job.v14.RUN_JOB" />
                        </intent-filter>
                    </receiver>
                    <receiver
                        android:name="com.evernote.android.job.JobBootReceiver"
                        android:exported="false" >
                        <intent-filter>
                            <action android:name="android.intent.action.BOOT_COMPLETED" />
                            <action android:name="android.intent.action.QUICKBOOT_POWERON" />
                            <action android:name="com.htc.intent.action.QUICKBOOT_POWERON" />
                            <action android:name="android.intent.action.MY_PACKAGE_REPLACED" />
                        </intent-filter>
                    </receiver>
                    <service
                        android:name="com.evernote.android.job.gcm.PlatformGcmService"
                        android:enabled="false"
                        android:exported="true"
                        android:permission="com.google.android.gms.permission.BIND_NETWORK_TASK_SERVICE" >
                        <intent-filter>
                            <action android:name="com.google.android.gms.gcm.ACTION_TASK_READY" />
                        </intent-filter>
                    </service>
                    <service
                        android:name="com.evernote.android.job.JobRescheduleService"
                        android:exported="false"
                        android:permission="android.permission.BIND_JOB_SERVICE" />

                    <!-- APPNEXUS("AppNexus") -->
                    <activity
                        android:name="com.appnexus.opensdk.AdActivity"
                        android:configChanges="orientation|screenLayout|screenSize|keyboardHidden"
                        android:theme="@android:style/Theme.NoTitleBar.Fullscreen" />

                    <!-- OGURY("Ogury") -->
                    <!-- <meta-data
                        android:name="presage_key"
                        android:value="000000" />
                    <service
                        android:name="io.presage.PresageService"
                        android:enabled="true"
                        android:exported="true"
                        android:process=":remote" >
                        <intent-filter>
                            <action android:name="io.presage.PresageService.PIVOT" />
                        </intent-filter>
                    </service>
                    <activity
                        android:name="io.presage.activities.PresageActivity"
                        android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
                        android:hardwareAccelerated="true"
                        android:theme="@android:style/Theme.Translucent.NoTitleBar" >
                        <intent-filter>
                            <action android:name="io.presage.intent.action.LAUNCH_WEBVIEW" />
                            <category android:name="android.intent.category.DEFAULT" />
                        </intent-filter>
                    </activity>
                    <receiver android:name="io.presage.receiver.NetworkChangeReceiver" >
                        <intent-filter>
                            <action android:name="android.net.conn.CONNECTIVITY_CHANGE" />
                            <action android:name="android.net.wifi.WIFI_STATE_CHANGED" />
                            <action android:name="io.presage.receiver.NetworkChangeReceiver.ONDESTROY" />
                        </intent-filter>
                    </receiver>
                    <receiver android:name="io.presage.receiver.AlarmReceiver" />
                    <provider
                        android:name="io.presage.provider.PresageProvider"
                        android:authorities="${applicationId}.PresageProvider"
                        android:enabled="true"
                        android:exported="true" /> -->

                    <!-- OPENX("OpenX") -->
                    <activity
                        android:name="com.openx.sdk.browser.AdBrowserActivity"
                        android:configChanges="orientation|screenSize|keyboardHidden"
                        android:theme="@android:style/Theme.NoTitleBar"
                        android:windowSoftInputMode="adjustPan|stateHidden" >
                    </activity>
                    <!-- ads end -->

                </application>
            </manifest>

        ]]></manifestAdditions>
    </android>
Note that android.permission.ACCESS_COARSE_LOCATION and android.permission.ACCESS_FINE_LOCATION are not obligatory.

If you are not using all ad networks you can delete from manifest parts beginning with a comment with the name of unused network. Note that some ad networks share one activity.

Facebook Audience Network Integration

For Facebook integration please contact with support: support@addapptr.com

Usage guide

Initialize AATKit

App Tracking Transparency & iOS 14.5

Starting with iOS 14.5 publishers have to use the App Tracking Transparency framework when accessing the IDFA. This is why you should present the app-tracking authorization request to the end user. To achieve this, please use ANE-IDFA.

GDPR - General Data Protection Regulation

Using the CMP through AddApptr provided wrapper

With the introduction of IAB TCF2.0, AddApptr will no longer act as a CMP. Instead, we provide wrappers allowing for easily integrating third-party CMPs. Please note that the CMPs need a server-side configuration, please contact support@addapptr.com if you need support.

There are following methods for Managed Consent:

There are following events related to Managed Consent:

CMP Implementations

For now, we provide two CMP implementations:

CMP Google

Android requires appId to be added to Manifest, like

#!javascript
<meta-data
          android:name="com.google.android.gms.ads.APPLICATION_ID"
          android:value="YOUR-APP-ID"/>

For iOS you need to set the GADApplicationIdentifier value to the Info.plist file, like:

#!javascript
<key>GADApplicationIdentifier</key>
<string>YOUR-APP-ID</string>

Code example:

#!ActionScript
    var consent:AATKitConsent = new AATKitConsent();
    consent.type = AATKitConsent.MANAGED_CMP_GOOGLE_CONSENT;
    configuration.consent = consent;
CMP Ogury

Requires Asset Key as configuration parameter when initializing AATKit.

Code example:

#!ActionScript
    var consent:AATKitConsent = new AATKitConsent();
    consent.type = AATKitConsent.MANAGED_CMP_OGURY_CONSENT;
    consent.assetKeyCMPOgury = "your-asset-key";
    configuration.consent = consent;

Not using the AddApptr CMP wrapper

If for some reason you do not want to use AddApptr CMP wrappers, AATKit also provides another methods for GDPR compliance. The consentRequired configuration field allows you to inform AATKit if the user is subject to the GDPR laws:

#!ActionScript
configuration.consentRequired = true;

For publishers not using the Managed Consent, we have introduced another type of Consent for GDPR-compliance, allowing to pass network-specific consent status. To use it, you need to initialize AATKit with consent type set as AATKitConsent.VENDOR_CONSENT. Also you should pass the list of networks which should have consent set as obtained. AATKit will set consent as withheld for another networks.

#!ActionScript
    var consent:AATKitConsent = new AATKitConsent();
    consent.type = AATKitConsent.VENDOR_CONSENT;
    consent.vendorConsentObtainedNetworks = [AATKitExtension.ADCOLONY,AATKitExtension.DFP,AATKitExtension.UNITYADS];
    configuration.consent = consent;

To define if the user has given or withheld consent for the collection and use of personal data (used for non-IAB partners) set configuration type value as AATKitConsent.SIMPLE_CONSENT and use nonIABConsent value as:

  • AATKitConfiguration.Consent.OBTAINED if the user has given the consent.
  • AATKitConfiguration.Consent.WITHHELD if the user has declined.

If Simple Consent is used, it will automatically read the IAB Consent String stored (by third-party CMP) in SharedPreferences (if available).

#!ActionScript
    var consent:AATKitConsent = new AATKitConsent();
    consent.type = AATKitConsent.SIMPLE_CONSENT;
    consent.nonIABConsent = AATKitConfiguration.Consent.OBTAINED;
    configuration.consent = consent;

Create placements and start autoreloading

#!ActionScript
import com.intentsoftware.addapptr.AATKitExtension;

public class AATKitDemo
{
    private var aatkit:AATKitExtension = null;

    public function AATKitDemo()
    {
        super();

        aatkit = AATKitExtension.getInstance();
        ...
        // banner placement
        aatkit.createPlacement("BannerPlacement", AATKitExtension.BANNERAUTO);
        aatkit.startPlacementAutoReload("BannerPlacement");

        // fullscreen placement
        aatkit.createPlacement("InterstitialPlacement", AATKitExtension.FULLSCREEN);
        aatkit.startPlacementAutoReload("InterstitialPlacement");
    }
}

Adding placements

Banner ads

Fullscreen ads

Rewarded ads

AATKit events

#!ActionScript
import com.intentsoftware.addapptr.AATKitExtension;;
import com.intentsoftware.addapptr.AATKitEvent;

public class AATKitDemo
{
    private var aatkit:AATKitExtension = null;

    public function AATKitDemo()
    {
        super();

        aatkit = AATKitExtension.getInstance();

        ...

        aatkit.addEventListener(AATKitEvent.HAVEAD, onHaveAd);
    aatkit.addEventListener(AATKitEvent.NOAD, onNoAd);
    aatkit.addEventListener(AATKitEvent.PAUSEFORAD, onPauseForAd);
    aatkit.addEventListener(AATKitEvent.RESUMEAFTERD, onResumeAfterAd);
    aatkit.addEventListener(AATKitEvent.SHOWINGEMPTY, onShowingEmpty);
    aatkit.addEventListener(AATKitEvent.USEREARNEDINCENTIVE, onUserEarnedIncentive);
    aatkit.addEventListener(AATKitEvent.OBTAINEDADRULES, onObtainedAdRules);
    aatkit.addEventListener(AATKitEvent.HAVEMULTISIZEAD, aatkitHaveMultisizeAd);


    function onHaveAd(event:AATKitEvent):void
    {
        trace("onHaveAd: " + event.placementName); 
    }

    function onNoAd(event:AATKitEvent):void
    {
        trace("onNoAd: " + event.placementName); 
    }

    function onPauseForAd(event:AATKitEvent):void
    {
        trace("onPauseForAd: " + event.placementName); 
    }

    function onResumeAfterAd(event:AATKitEvent):void
    {
        trace("onResumeAfterAd: " + event.placementName); 
    }

    function onShowingEmpty(event:AATKitEvent):void
    {
        trace("onShowingEmpty: " + event.placementName); 
    }

    function onUserEarnedIncentive(event:AATKitEvent):void
    {
        trace("onUserEarnedIncentive: " + event.placementName); 
    }

    function onObtainedAdRules(event:AATKitEvent):void
    {
        trace("onObtainedAdRules: " + event.fromTheServer); 
    }
    }
}

Methods

init():void DEPRECATED

initWithTestMode(testID:int):void DEPRECATED

initWithRulesCaching(cachingEnabled:Boolean, initialRules:String):void DEPRECATED

initWithConfiguration(configuration:AATKitConfiguration):void

reconfigureUsingConfiguration(configuration:AATKitConfiguration):void

setDebugEnabled():void

setDebugShakeEnabled(enabled:Boolean):void

getVersion():String

showConsentDialogIfNeeded():void

editConsent():void

reloadConsent():void

isNetworkEnabled(network:int):Boolean

setNetworkEnabled(network:int, enabled:Boolean):void

setTargetingInfoForPlacement(placementName:String, info:String):void

setTargetingInfo(info:String):void

addAdNetworkForKeywordTargeting(network:int,):void

removeAdNetworkForKeywordTargeting(network:int):void

Placements

createPlacement(placementName:String, placementSize:int):void

startPlacementAutoReload(placementName:String):void

stopPlacementAutoReload(placementName:String):void

reloadPlacement(placementName:String):Boolean

reloadPlacementForced(placementName:String, forced:Boolean):Boolean

hasAdForPlacement(placementName:String):Boolean

Banner only

addPlacementToView(placementName:String):void

removePlacementFromView(placementName:String):void

startPlacementAutoReloadWithSeconds(placementName:String, seconds:int):void

setPlacementAlignment(placementName:String, bannerAlignment:int):void

setPlacementAlignmentWithOffset(placementName:String, bannerAlignment:int, x:int, y:int):void

setPlacementPosition(placementName:String, posX:int, posY:int):void

setPlacementContentGravity(placementName:String, gravity:int):void

Fullscreen only

showPlacement(placementName:String):Boolean

Promo specials

enablePromo():void - Deprecated

Will be removed in a future release: Use PreparePromo and ShowPromo: instead.

disablePromo():void - Deprecated

Will be removed in a future release: Use PreparePromo and ShowPromo: instead.

preparePromo():void

showPromo(force:Boolean):Boolean

AATKit delegate events

function onHaveAd(event:AATKitEvent):void

function onHaveMultisizeAd(event:AATKitEvent):void

function onNoAd(event:AATKitEvent):void

function onPauseForAd(event:AATKitEvent):void

function onResumeAfterAd(event:AATKitEvent):void

function onShowingEmpty(event:AATKitEvent):void

function onUserEarnedIncentive(event:AATKitEvent):void

function onObtainedAdRules(event:AATKitEvent):void

function onManagedConsentNeedsUserInterface(event:AATKitEvent):void

function managedConsentCMPFinished(event:AATKitEvent):void

function managedConsentCMPFailedToLoad(event:AATKitEvent):void

function managedConsentCMPFailedToShow(event:AATKitEvent):void

Statistics Events

countedAdSpace

countedRequest

countedResponse

countedImpression

countedVimpression

countedClick

Updated