I call interstitial#loadAd at a point when I am pretty confident that an ad will need to shown in the near future.
Then when I want to show the ad it's a simple matter of:
if (interstitial.isReady()) {
interstitial.show();
}
No waiting for users and you get to show the ad most times. It all comes down to placement of that call to #loadAd. For me it is at the start of a game. And the ad is shown at the end of a game.
William
On Friday, March 8, 2013 11:42:16 PM UTC+10, Eyvind Almqvist wrote:
I noticed that the process of getting the interstitial ads ready
sometimes takes a few seconds. This could be annoying for the user,
since interstitial ad could just pop up when the user is occupied with
something in the app. It would be better if the interstitial ad was
shown exactly when it is supposed to be shown. It would probably result
in less bad reviews. So how should we implement our code to get the interstitial ads shown as quickly as possible? This is how it looks like now:
onCreate method when the app starts:
interstitial = new InterstitialAd(this, MY_INTERSTITIAL_UNIT_ID);
adRequest = new AdRequest();
interstitial.setAdListener(this);
in the showAd method later when the ad should be shown:
interstitial.loadAd(adRequest);
if (interstitial.isReady())
interstitial.show();
I tried to move interstitial.loadAd(adRequest); to the onCreate method,but the ad got shown when the app starts then, which is not how it should be.
We recently got approved by Google to use Admobs interstitial ads, so it would be good to launch these ads now.