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);



-- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/android-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-developers/7d4be080-dda2-44aa-9f37-635ea2f0fa1b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to