nterstitial I close it and re-open

  • Replies:0
  • OpenNot stickiedUnanswered
  • Forum posts: 1

Aug 30, 2017 8:51:01 PM via Website

I made an app and added an interstitial. I set the display frequency from Admob (5 times in half an hour). Ads are opening. The ad reopens 2 seconds after I press the close button. How can I fix this?

in main.java;
.....

protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);    
    mInterstitialAd = new InterstitialAd(this);
    mInterstitialAd.setAdUnitId("ca-app-pub-2873523357169249/5651xxxxx");
    reklamiYukle();
    mInterstitialAd.setAdListener(new AdListener() {
        @Override
        public void onAdClosed() {
            reklamiYukle();
            super.onAdClosed();
        }

        @Override
        public void onAdLoaded() {
         super.onAdLoaded();
            mInterstitialAd.show();
        }

.......................

private void reklamiYukle() {
AdRequest adRequest = new AdRequest.Builder()
        .addTestDevice(AdRequest.DEVICE_ID_EMULATOR)
        .build();

mInterstitialAd.loadAd(adRequest);