dependencies {
compile 'com.github.florent37:adsmanager:1.0.3'
}
final AdsManager adsManager = new AdsManager(this, R.string.admob_app, BuildConfig.DEBUG);
adsManager.showAdsOnDebug(true);
adsManager.setAdInvisibilityOnDebug(View.INVISIBLE);
On activity
adsManager.insertAdView(this, adContainer, R.string.admob_footer, AdSize.BANNER);
adsManager.loadAndShowInterstitial(R.string.admob_interstitial_install)
.subscribe(new Consumer<Boolean>() {
@Override
public void accept(Boolean aBoolean) throws Exception {
//closed
}
}, new Consumer<Throwable>() {
@Override
public void accept(Throwable throwable) throws Exception {
//error
}
});