Skip to content

With this repository you can apply all Banner and Interstitial Admob in multiple Activities without repeat coding on each activities. Check below for one-time set up

License

Notifications You must be signed in to change notification settings

showdpro/Easy_Admob_SetUp

Repository files navigation

"# Easy_Admob_SetUp"

Usage:

Required:

Project Build.gradle add classpath {url 'https://jetpack.io'}

in app Build.gradle (implement firebase ads)

implementation 'com.github.fafara:Easy_Admob_SetUp:1.7.0'

To Implement Banner ads

For Test Banner

Apply the Adview in your XML file and in corresponding Java Class:

Import ng.somoye.mylibrary.AdmobSetUp;

You may define the Adview mAdview; however if you dont it will call the default adview and app_id from this library.

in the onCreate, use the below codes to call the Adview method

AdmobSetUp.AllAdview.SetAd(mAdview);

Note banner id is defined in this lib as sample_banner_id

Dont forget to implement in AndroidManifest.xml the Application ID from google

For Real Banner

use the above test method but change the app_id to myapp_id to avoid conflicting ids and add all your real banner_id

For Interstitial ads

define the Interstitial mInterstitial;

in your java class and attach it to all buttons in any activities in your app with the below codes.

AdmobSetUp.AllInterstitial.SetInterstitial(mInterstitial);

AdmobSetUp.AllInterstitial.showInterstitial();

Feel free to fork or apply this project in your project. You can also help contribut to this project in order to make it easy for ads implementation for other ad networks. Thanks

About

With this repository you can apply all Banner and Interstitial Admob in multiple Activities without repeat coding on each activities. Check below for one-time set up

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages