DevFx16/flutter_adcolony
पब
- Stars
- 9
- Forks
- 5
- अंतिम पुश (UTC)
- 26 अग॰ 2021
- प्रोजेक्ट स्थिति
- सक्रिय
भाषाएँJavaDartRubySwiftObjective-CShell
उपयोग की गई निर्भरताएँ
निर्भरता सूची 2 आइटम
- flutter
{"sdk":"flutter"} - flutter_testडेवलपमेंट
{"sdk":"flutter"}
मूल README
यह अंग्रेज़ी मूल स्नैपशॉट है। नवीनतम सामग्री GitHub पर देखें।
README खोलें / बंद करें
Flutter AdColony
Note: Currently only Android platform is supported.
Note: AndroidX is required.
Getting Started
1. Initialization
Call Adcolony.init(); during app initialization.
AdColony.init(AdColonyOptions('#your_app_id', '0', this.zones));
class AdColonyOptions {
final String id;
final String gdpr;
final List<String> zones;
AdColonyOptions(this.id, this.gdpr, this.zones);
Map<String, dynamic> toJson() =>
{'Id': this.id, 'Gdpr': this.gdpr, 'Zones': this.zones};
}
2. Request Interstitial Ad and Rewarded Video Ad
AdColony.request('#ad_zone', listener);
3. Show Ad in listener
listener(AdColonyAdListener event) {
if (event == AdColonyAdListener.onRequestFilled)
AdColony.show();
}
4. Show Ad Banner
BannerView((AdColonyAdListener event) => print(event), BannerSizes.leaderboard, '#ad_zone'),
5. 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
enum AdColonyAdListener {
onRequestFilled,
onRequestNotFilled,
onReward,
onOpened,
onClosed,
onIAPEvent,
onExpiring,
onLeftApplication,
onClicked
}
Future Work
Implement for iOS platform.