Skip to content

alakreasi/flutter_applovin

 
 

Repository files navigation

AppLovin

Note: Currently only Android platform is supported.

Note: only show interstitial and video rewarded ads.

Getting Started

  1. Initialization

Call Applovin.init(); during app initialization.

  Applovin.init();

Add inside the <application> tag

<meta-data android:name="applovin.sdk.key"
    android:value="xxxx"  />

2. Request Interstitial Ad and Rewarded Video Ad

AppLovin.requestInterstitial((AppLovinAdListener event) => listener(event, false), interstitial: true)

3. Show Interstitial Ad and Rewarded Video Ad

listener(AppLovinAdListener event){
    if(event == AppLovinAdListener.adReceived) AppLovin.showInterstitial(interstitial: true);
  }

4. Show Banner Widget

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

Events

enum AppLovinAdListener {
  adReceived,
  failedToReceiveAd,
  adDisplayed,
  adHidden,
  adClicked,
  adOpenedFullscreen,
  adClosedFullscreen,
  adLeftApplication,
  adFailedToDisplay
}

Banners Sizes

enum BannerAdSize {
  banner,
  mrec,
  leader,
}

Future Work

Implement for iOS platform, NativeAds.

About

Flutter Plugin Ad Network AppLovin

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 63.3%
  • Dart 24.5%
  • Swift 3.5%
  • Ruby 3.4%
  • Shell 2.7%
  • Objective-C 2.6%