有一个插页式广告:
//Создаём межстраничное объявление
interstitial = new InterstitialAd(this);
interstitial.setAdUnitId("ca-app-pub-****/****");
// Создаём запрос к AdMob
AdRequest adRequesti = new AdRequest.Builder().build();
// Начинаем загружать объявление
interstitial.loadAd(adRequesti);
public void displayInterstitial() {
if (interstitial.isLoaded()) {
interstitial.show();
}
}
@Override
protected void onResume() {
super.onResume();
displayInterstitial();
}
问题是广告只显示一次。我希望在点击此活动时始终显示广告。
展示后立即再次加载广告: