adcolony 0.0.1 adcolony: ^0.0.1 copied to clipboard
Adcolony plugin for Flutter apps. you can show interstitial ads and Rewarded video ads.
Flutter AdColony #
Note: Currently only Android platform is supported.
Note: AndroidX is required.
Getting Started #
1. Initialization #
Call Adcolony.initialize();
during app initialization.
Adcolony.initialize(appid: 'your_app_id', zoneid: ['your_zones_ids']);
2. Request Interstitial Ad and Rewarded Video Ad #
Adcolony.requestInterstitial(zoneid: 'your_zone_interstitial_id');
3. Show Ad #
Adcolony.onRequestFilled = () {
Adcolony.showAd();
};
4. ProGuard Configuration #
# For communication with AdColony's WebView
-keepclassmembers class * {
@android.webkit.JavascriptInterface <methods>;
}
# For removing warnings due to lack of Multi-Window support
-dontwarn android.app.Activity
Events #
Event | Description |
---|---|
OnRequestFilled | Called in response to an ad request when the request has been successfully filled. |
OnRequestNotFilled | Called in response to an ad request when the request failed to fill. |
OnOpened | Called when the interstitial ad opens. |
OnExpiring | Called when an intersitial expires and is no longer valid for playback. |
OnReward | Called when the rewarded video ends successfully. |
Future Work #
Implement for iOS platform.