EasyAds is a simple library that enables you to easily display mobile ads from Facebook or AdMob, or both, in your Android applications. With EasyAds, you can integrate banner ads and interstitial ads from both ad networks with minimal effort.
- Facebook Ads: Display Facebook banner ads and interstitial ads.
- AdMob Ads: Display AdMob banner ads and interstitial ads.
- Flexible Integration: Use either Facebook ads, AdMob ads, or both according to your preference.
-
Initialize
AdsConfig
and create a container for the banner ad:AdsConfig adsConfig; LinearLayout adContainer = (LinearLayout) findViewById(R.id.banner_container);
-
Set up the
AdsConfig
and show Facebook banner and interstitial ads:adsConfig = new AdsConfig(getApplicationContext()); // Show Facebook banner ad adsConfig.showFacebookBanner(adContainer, "325652518524302_326131715143049"); // Show Facebook interstitial ad adsConfig.ShowAndLoadFacebookInterstitial();
-
Initialize
AdsConfig
:AdsConfig adsConfig;
-
Set up the
AdsConfig
and show AdMob banner and interstitial ads:adsConfig = new AdsConfig(getApplicationContext(), adview); // Show AdMob banner ad adsConfig.ShowAdmobBanner(); // Show AdMob interstitial ad adsConfig.ShowAdmobInterstitialAd("unit-id");
AdsConfig adsConfig;
LinearLayout adContainer = (LinearLayout) findViewById(R.id.banner_container);
adsConfig = new AdsConfig(getApplicationContext());
// Show Facebook banner ad
adsConfig.showFacebookBanner(adContainer, "325652518524302_326131715143049");
// Show Facebook interstitial ad
adsConfig.ShowAndLoadFacebookInterstitial();