First Time Configuration
AppLovin Config

AppLovin Configuration

Note

You can either use Admob or AppLovin, this app contains the configuration for both but only one ad network can be used. Choose one network and follow the instructions.

Overview

AppLovin is a leading mobile advertising platform that helps developers monetize their apps and maximize revenue. With advanced targeting and optimization capabilities, AppLovin delivers highly engaging and personalized ads to users, ensuring a seamless and rewarding app experience. Boost your app's earnings and user engagement with AppLovin's powerful advertising solutions.

Steps

1. Create an AppLovin account

To use AppLovin in your Flutter app, you must first create an AppLovin account. You can sign up for an AppLovin account at https://www.applovin.com/max/ (opens in a new tab).

2. Add Interstitial Ad Unit

  1. Click on the “MAX” tab.
  2. Go to "Manage" -> "Ad Units" -> "Create Ad Unit".
  3. Click the “Add Ad Unit” button.
  4. Select 'Intersitial Ad' ad type.
  5. Fill in the required details and click “Save”.

3. Add Rewarded Ad Unit

  1. Click on the “MAX” tab.
  2. Go to "Manage" -> "Ad Units" -> "Create Ad Unit".
  3. Click the “Add Ad Unit” button.
  4. Select 'Rewarded Ad' ad type.
  5. Fill in the required details and click “Save”.

5. Replace the AppLovin SDK Key for Android in 'AndroidManifest.xml':

under /android/app/src/main/AndroidManifest.xml replace your AppLovin SDK Key here:

<!-- AppLovin SDK-->
<!-- TODO: Put your AppLovin SDK Key here or comment this line if you don't want to use AppLovin-->
<meta-data android:name="applovin.sdk.key" android:value="APPLOVIN_SDK_KEY" />


6. Replace the AppLovin SDK Key for iOS in 'Info.plist':

under /ios/Runner/Info.plist replace your AppLovin SDK Key here:

<!-- TODO: Put your AppLovin SDK here-->
<key>AppLovinSdkKey</key>
<string> APPLOVIN_SDK_KEY</string>


Optional: Add your Privacy Policy Link & Terms of Service Link.

7. Replace your Ad units & AppLovin SDK Key in the app:

You will find the Unit Ids for both Android and iOS in all 3 environments under /lib/src/env/config/

replace your add units here:

  // TODO: REPLACE WITH YOUR APPLOVIN SDK KEY
  @override
  String get appLovinSdkKey => 'YOUR_APPLOVIN_SDK_KEY';
 
  // TODO: REPLACE WITH YOUR ANDROID INTERSTITIAL AD ID
  @override
  String get androidInterstitialAdId => 'ANDROID_INTERSTITIAL_AD';
 
  // TODO: REPLACE WITH YOUR IOS INTERSTITIAL AD ID
  @override
  String get iosInterstitialAdId => 'IOS_INTERSTITIAL_AD';
 
  // TODO: REPLACE WITH YOUR ANDROID REWARDED AD ID
  @override
  String get androidRewardedAdId => 'ANDROID_REWARDED_AD';
 
  // TODO: REPLACE WITH YOUR IOS REWARDED AD ID
  @override
  String get iosRewardedAdId => 'IOS_REWARDED_AD';


You can then run your app and verify that the test ads are displayed.