My question is about Google Admob interstitial ads:
com.google.android.gms.ads.interstitial.InterstitialAd;
Once I've loaded (properly and according to the documentation) an IntersitialAd
object (mInterstitialAd
) I can display the ad by calling the Show
method as long as mInterstitialAd != Null
:
if (mInterstitialAd != null) {
mInterstitialAd.show(MyActivity.this);
} else {
Log.d("TAG", "The interstitial ad wasn't ready yet.");
}
But what happens if it takes me hours to display the ad? Will this still be a valid ad impression even if the mInterstitialAd != Null
or it expires after some time?
I finally found the solution in a document about Admob display rate optimization.
Preloaded ads cannot be stored for more than one hour. Impressions recorded with preloaded ads that have been stored for more than an hour are not counted. Ads that are cached for more than an hour must be updated by making a new ad request.
UPDATE:
Since ads expire after an hour, you should clear this cache and reload with new ads every hour.
Found in: https://developers.google.com/admob/android/interstitial