0

I am using this code to show load an add

AdRequest interstitialRequest = new AdRequest.Builder().build();
interstitialAd.loadAd(interstitialRequest);

and this to show it

interstitialAd.show();

What way do you recommend to chain this 2 events. The goal is to automatically present an interstitial ad every 60s. Something like calling a function loadAd(), and once loading is done, it shows it. Basically I some kind of listener that gets triggered when the ad is loaded and ready to display.

Viral Patel
  • 32,418
  • 18
  • 82
  • 110
potato
  • 4,479
  • 7
  • 42
  • 99

1 Answers1

0

First, you should not display interstitials like that (at regular intervals). It should always be at logical break points during the usage of your app like level chande or exiting the app.

But, if you still want go go ahead and do that write a timer and check elapsed time and call the show method immediately followed by the load method every 60 secs. - Read more here

Again, I'll highly recommend not to call it like that every minute. It is not as per guidelines and will severely degrade the user experience.

Community
  • 1
  • 1
Viral Patel
  • 32,418
  • 18
  • 82
  • 110