Note: Currently only Android platform is supported.
Note: only show interstitial and video rewarded ads.
- Initialization
Call Applovin.init();
during app initialization.
Applovin.init();
Add inside the <application>
tag
<meta-data android:name="applovin.sdk.key"
android:value="xxxx" />
AppLovin.requestInterstitial((AppLovinAdListener event) => listener(event, false), interstitial: true)
listener(AppLovinAdListener event){
if(event == AppLovinAdListener.adReceived) AppLovin.showInterstitial(interstitial: true);
}
BannerView((AppLovinAdListener event) => print(event), BannerAdSize.banner),
BannerView((AppLovinAdListener event) => print(event), BannerAdSize.mrec),
BannerView((AppLovinAdListener event) => print(event), BannerAdSize.leader),
true for interstitial false for Rewarded
enum AppLovinAdListener {
adReceived,
failedToReceiveAd,
adDisplayed,
adHidden,
adClicked,
adOpenedFullscreen,
adClosedFullscreen,
adLeftApplication,
adFailedToDisplay
}
enum BannerAdSize {
banner,
mrec,
leader,
}
Implement for iOS platform, NativeAds.