Search packages, repositories and app categories

GitHub repositoryDevFx16/flutter_adcolony

flutter_adcolony

Pub:

flutter_adcolony project cover
Stars
9
Forks
5
Last push (UTC)
Aug 26, 2021
Project status
Active

Original README

English project snapshot. Visit GitHub for the latest content.

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};
}

For more information GDPR

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.

Fernando Araujo GitHub avatar
GitHub author

Fernando Araujo ↗

Desarrollor de Software FullStack JavaScript, Desarrollador Móvil JavaScript y Flutter

SIIGO SASCartagena, ColombiaOfficial website ↗
LanguagesJavaDartRubySwiftObjective-CShell

Dependencies used

Dependency list 2 items

  • flutter{"sdk":"flutter"}
  • flutter_testDevelopment{"sdk":"flutter"}

How do I choose a repository?

Start with your use case, compare repository activity, and check the original project before adopting it.

  1. Search by repository name, owner or description, then narrow the results by topic.
  2. Compare stars, forks and recent pushes. Stars show community interest, not a guarantee of quality.
  3. Read the README, license and issues on GitHub before using a project.

Sources and maintenance

“A repository is the most basic element of GitHub.”

GitHub Docs — About repositories ↗