PremiumAds AppLovin MAX Adapter — Flutter
Integrate PremiumAds as a mediation ad source in your Flutter app using the official applovin_max plugin.
Supported formats: Banner, MREC, Interstitial, Rewarded, Native
App Open is not supported by the PremiumAds MAX adapter.
Prerequisites
- Flutter with Dart SDK compatible with
applovin_max^4.0.0 - applovin_max plugin, already integrated
1. Add the Plugin
Add the PremiumAds adapter to your pubspec.yaml:
dependencies:
applovin_max: ^4.0.0
premium_ads_max: ^1.0.0
Then run:
flutter pub get
Or install via command line:
flutter pub add premium_ads_max
Alternative: install from Git
dependencies:
premium_ads_max:
git:
url: https://github.com/premium-ads/max-adapter-flutter.git
ref: v1.0.0
2. Native Dependencies (Automatic)
The plugin pulls native binaries automatically — no manual setup needed:
- Android:
net.premiumads.sdk:max-adapter— the plugin'sbuild.gradleinjects the PremiumAds Maven repository automatically. - iOS:
PremiumAdsMaxAdapterpod from CocoaPods trunk (requires AppLovin MAX SDK 13.0+).
After flutter pub get, run on iOS:
cd ios && pod install && cd ..
3. Configure the MAX Custom Network
In the AppLovin MAX dashboard, add PremiumAds as a Custom Network and configure a Custom Adapter for each ad unit:
| Platform | Field | Value |
|---|---|---|
| Both | Network Name | PremiumAds Custom Adapter |
| Android | Adapter Class Name | net.premiumads.sdk.adapter.max.PremiumAdsAdapter |
| iOS | Adapter Class Name | PremiumAdsAdapter |
| Both | Placement / Parameter | Your PremiumAds ad unit ID |
The same adapter class works for Banner, MREC, Interstitial, Rewarded, and Native ad formats.
4. Load Ads
The adapter is invoked automatically by the AppLovin MAX SDK — no extra code needed beyond installing this plugin. Use the standard applovin_max API:
import 'package:applovin_max/applovin_max.dart';
import 'package:premium_ads_max/premium_ads_max.dart';
void main() async {
WidgetsFlutterBinding.ensureInitialized();
// Optional: enable debug logging
await PremiumAdsMax.setDebug(true);
await AppLovinMAX.initialize('YOUR_SDK_KEY');
runApp(const MyApp());
}
5. Debug Logging (Optional)
Enable verbose debug logging from the PremiumAds adapter:
import 'package:premium_ads_max/premium_ads_max.dart';
await PremiumAdsMax.setDebug(true);
Filter logs:
- Android Logcat:
tag:PremiumAdsAdapter - iOS Xcode console:
[PremiumAdsAdapter]
6. Build & Run
Android
flutter run -d android
iOS
cd ios && pod install && cd ..
flutter run -d ios
Source Code
- pub.dev: https://pub.dev/packages/premium_ads_max
- Repository: https://github.com/premium-ads/max-adapter-flutter
Troubleshooting
Build fails on iOS with missing PremiumAdsMaxAdapter:
cd ios && pod install --repo-update
Build fails on Android with missing AAR:
Add the PremiumAds Maven repository to android/build.gradle if not auto-resolved:
allprojects {
repositories {
maven { url 'https://repo.premiumads.net/artifactory/mobile-ads-sdk/' }
}
}
New ad units / waterfall changes don't take effect immediately: Changes to ad units or waterfall configuration in the MAX dashboard take 30–60 minutes to propagate.
Ads never load / NO FILL (HTTP 204):
A NO FILL response means the waterfall has no eligible line item for the requesting app/device — check that your ad unit has active demand and that the app's bundle/package ID matches the app configured in the MAX dashboard.
Adapter not initialized: Verify the custom network class names in the MAX dashboard match exactly:
- Android:
net.premiumads.sdk.adapter.max.PremiumAdsAdapter - iOS:
PremiumAdsAdapter
Documentation
Support
Contact your PremiumAds account manager or email [email protected]