burak yldrm
- Forum posts: 1
Aug 30, 2017, 8:51:01 PM via Website
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);
Recommended editorial content
With your consent, external content is loaded here.
By clicking on the button above, you agree that external content may be displayed to you. Personal data may be transmitted to third-party providers in the process. You can find more information about this in our Privacy Policy.