This section shows you how to download, configure, and initialize the AppLovin MAX AIR Extension.
Download the Latest Adobe AIR Extension
If you want to receive release updates, subscribe to the AppLovin MAX Adobe AIR Extension GitHub repository.
Import the Extension
Add the AppLovinMAX-version.ane file to your project’s libraries folder (generally lib/) and com.applovin.air
extensionID
to your application descriptor XML file (generally app-name-app.xml) within the extensions
element as shown below:
<extensions> <extensionID>com.applovin.air</extensionID> </extensions>
Android Manifest
This section explains how you adjust your Android Manifest in your application descriptor XML file by adding the appropriate permissions, activities, providers, and services. You must make these additions to your Android Manifest in order to properly initialize AppLovin MAX SDK and show ads.
Permissions
Add the following uses-permission
elements to your application descriptor XML file inside the manifestAdditions
element as shown below:
<manifestAdditions> <![CDATA[ <manifest android:installLocation="auto"> ⋮ <uses-permission android:name="android.permission.INTERNET"/> <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/> ⋮ <application> ⋮ </application> </manifest> ]]> </manifestAdditions>
Activities, Providers, and Services
Add the following activities, providers, and services inside the <application>
element on your Android Manifest of your application descriptor XML file:
<manifestAdditions> <![CDATA[ <manifest android:installLocation="auto"> ⋮ <application> ⋮ <provider android:name="com.applovin.sdk.AppLovinInitProvider" android:authorities="your-application-package-name.applovininitprovider" android:exported="false" android:initOrder="101" /> <activity android:name="com.applovin.adview.AppLovinInterstitialActivity" android:configChanges="orientation|screenSize|smallestScreenSize|screenLayout|uiMode" android:hardwareAccelerated="true" android:screenOrientation="behind" /> <activity android:name="com.applovin.adview.AppLovinFullscreenActivity" android:configChanges="keyboard|keyboardHidden|locale|orientation|screenLayout|screenSize|smallestScreenSize|uiMode" android:exported="false" android:hardwareAccelerated="true" android:launchMode="singleTop" android:screenOrientation="behind" /> <activity android:name="com.applovin.sdk.AppLovinWebViewActivity" android:configChanges="keyboardHidden|orientation|screenSize|uiMode" /> <activity android:name="com.applovin.mediation.MaxDebuggerActivity" android:configChanges="keyboardHidden|orientation|screenSize" /> <activity android:name="com.applovin.mediation.MaxDebuggerDetailActivity" android:configChanges="keyboardHidden|orientation|screenSize" /> <activity android:name="com.applovin.mediation.MaxDebuggerMultiAdActivity" android:configChanges="keyboardHidden|orientation|screenSize" /> <activity android:name="com.applovin.mediation.MaxDebuggerAdUnitsListActivity" android:configChanges="keyboardHidden|orientation|screenSize" /> <activity android:name="com.applovin.mediation.MaxDebuggerAdUnitDetailActivity" android:configChanges="keyboardHidden|orientation|screenSize" /> <activity android:name="com.applovin.mediation.MaxDebuggerTestLiveNetworkActivity" android:configChanges="keyboardHidden|orientation|screenSize" /> <service android:name="com.applovin.impl.sdk.utils.AppKilledService" android:exported="false" android:stopWithTask="false" /> <service android:name="com.applovin.impl.adview.activity.FullscreenAdService" android:exported="false" android:stopWithTask="false" /> ⋮ </application> </manifest> ]]> </manifestAdditions>
Then update the value of the authorities
attribute in the com.applovin.sdk.AppLovinInitProvider
provider
element with your package name.
Initialize the SDK
Attach the SdkInitializedEvent
event handler and initialize the SDK as soon as your app launches, as in the code sample below.
Ad assets that are fully cached result in a better user experience. Therefore, always initialize the AppLovin SDK on startup so as to give mediated networks the maximum amount of time to cache ads. This is especially important with video ads.
Do not use different network app IDs for the same network across different ad units. If you use different app IDs for the same network and app package name without using selective init you will break the network initialization process.
You may want to tag users with your own internal user ID so that you can then receive the ID in an impression-level user revenue API or in S2S-rewarded postbacks. If so, set the user ID before you initialize the SDK.
AppLovinMAXEvents.setSdkInitializedEvent(function (sdkConfiguration:SdkConfiguration):void { // Start loading ads }); AppLovinMAX.setUserId("user_id"); AppLovinMAX.initialize("your_sdk_key");
You can find your SDK key in the Account > General > Keys section of the AppLovin dashboard.
iOS 14 Support
In iOS 14, Apple introduced global privacy changes that you need to comply with. This section explains how to comply with these changes and thereby avoid a material drop in revenue.
SKAdNetwork
Update your app’s Info.plist in your application descriptor XML file inside the InfoAdditions
tag with network-specific identifiers. See the SKAdNetwork documentation for instructions.
MAX Terms & ATT Flow
Implement the MAX Terms & ATT Flow to integrate compliance with the ATT framework and acceptance of your Terms of Service and Privacy Policy.
Consent and Data APIs
In order to ensure you obtain consent from your users in applicable jurisdictions on behalf of our monetization partners and correctly pass consent flag values to AppLovin, please review Privacy–Consent and Data APIs.
iOS 15 Global SKAdNetwork Reporting
Starting with iOS 15, Apple allows developers to send a copy of their SKAdNetwork install postbacks to an endpoint of their choice. MAX provides a Global SKAdNetwork Report (MAX > Mediation > Analyze > Global SKA Report) for developers to access the SKAdNetwork data across all their network partners in one place. To leverage the MAX Global SKAdNetwork Report, enable iOS 15 SKAdNetwork reporting by using the app’s Info.plist:
- In your app’s Info.plist, create a new key named
NSAdvertisingAttributionReportEndpoint
of typeString
. - Enter the value:
https://postbacks-app.com
.
The final result should look something like this:
⋮ <iPhone> <InfoAdditions> <![CDATA[ ⋮ <key>NSAdvertisingAttributionReportEndpoint</key> <string>https://postbacks-app.com</string> ⋮ ]]> </InfoAdditions> </iPhone>
You can check the value of your app’s SKAdNetwork endpoint by using the Mediation Debugger.
To forward the SKAdNetwork postbacks to one or more third-party endpoints of your choice (including your MMP), please contact your account team.