AppLovin MAX Flutter Plugin
AppLovin MAX Flutter Plugin for Android and iOS.
Documentation
Check out our integration docs here.
Downloads
See pub.dev for the latest releases of the plugin.
Demo App Instructions
To get started with the demo app, please ensure Flutter is installed on your system. Once everything is properly installed, follow the instructions below to get the demo application up and running.
- Obtain your AppLovin SDK Key from the dashboard here.
- Obtain your Ad Unit IDs from the dashboard here.
- Update the
SDK_KEY
and Ad Unit IDs in themain.dart
file. - Update the package name from
com.applovin.enterprise.apps.demoapp
to one that matches your ad units. Be sure to do this for every package name reference in the demo app.
Android
build.gradle
:
1. Adding Adapters to - Navigate to your Flutter project directory in your file explorer or terminal.
- Within the project directory, navigate to
android/app/
to find thebuild.gradle
file. - Open
build.gradle
with a text editor or an IDE. - Add the adapters you need under dependencies, as the documentation specifies. It will look something like this:
dependencies {
// Other dependencies...
implementation 'com.example.adapter:version'
}
AndroidManifest.xml
with meta-data
(if required):
2. Updating - Within the
android/app/
directory, locate and open theAndroidManifest.xml
file. - If the network adapter you add requires
meta-data
, insert the necessarymeta-data
elements within the<application>
tag.
3. Adding Java or Kotlin Code (if required):
For Java:
- Navigate to
android/app/src/main/java/com/example/your_project_name
- Open
MainActivity.java
with a text editor or IDE. - Add the required Java code to this file, usually within the
configureFlutterEngine
method.
@Override
public void configureFlutterEngine(FlutterEngine flutterEngine) {
super.configureFlutterEngine(flutterEngine);
// Your Java code here...
}
For Kotlin:
- Navigate to
android/app/src/main/kotlin/com/example/your_project_name
- Open
MainActivity.kt
with a text editor or IDE. - Add the required Kotlin code to this file to this file, usually within the
configureFlutterEngine
method.
override fun configureFlutterEngine(flutterEngine: FlutterEngine) {
super.configureFlutterEngine(flutterEngine)
// Your Kotlin code here...
}
iOS
1. Adding adapters to your podfile:
- Locate your
Podfile
in the/ios
folder. - Open the Podfile with a text editor or IDE.
- Add the adapter pods to your application as specified in the documentation. It will look something like this
target 'Runner' do
flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
pod `AppLovinSDK`
end
2. Install the Pods:
- Save the
Podfile
. - Open a terminal window, navigate to the root of your Flutter project, and run the following command to install the pods:
flutter pub get
- Alternatively, you may also run
pod install
within theios
directory.
3. Adding code to your Xcode Project (if required):
- In your Flutter project's
ios
folder, find and open theRunner.xcworkspace
file to launch Xcode. - Locate the
AppDelegate.m
(Objective-C) orAppDelegate.swift
(Swift) file within Xcode. - Add the necessary code in the
didFinishingLaunchingWithOptions
as the adapter documentation directs.
License
MIT