About us Contact us privacy policy

Thursday, March 12, 2020

INTERSTITIAL AD by KIMJOH

adsby101


InterstitialAd interstitialAdMob;


//SHOW AD






loadInterstitialAdMob();

//METHOD







private void loadInterstitialAdMob() {
    interstitialAdMob = new InterstitialAd(this);
    interstitialAdMob.setAdUnitId(Constants.ADS_ADMOB_FULLSCREEN_ID);
    AdRequest adRequest = new AdRequest.Builder().build();
    interstitialAdMob.loadAd(adRequest);
    interstitialAdMob.setAdListener(new AdListener() {
        @Override        public void onAdLoaded() {
            interstitialAdMob.show();
        }
    });
}



// INTERSTITIAL AD ON ADAPTER
private void loadInterstitialAdMob() {
   // interstitialAdMob = new com.google.android.gms.ads.InterstitialAd(context);    interstitialAdMob = new InterstitialAd(context);
    interstitialAdMob.setAdUnitId(context.getString(R.string.admob_interstitial));
    AdRequest adRequest = new AdRequest.Builder().build();
    interstitialAdMob.loadAd(adRequest);
    interstitialAdMob.setAdListener(new AdListener() {
        @Override        public void onAdLoaded() {
            interstitialAdMob.show();
        }
    });
}

adsby102

No comments:

Post a Comment