Ads are loading, but not showing?

前端 未结 3 1231
一整个雨季
一整个雨季 2020-12-02 03:06

TL;DR: My interstitial ads are successfully loading, but when I call .show() on them, they don\'t show up!

I have followed these directions, and the a

3条回答
  •  北海茫月
    2020-12-02 03:32

    It turns out that I just had to remove the extra method call after the else. For example,

    public void tryAgain(View v) {
            if (mInterstitialAd.isLoaded()) {
    
                mInterstitialAd.show();
                Log.v(TAG, "LOADED in Game Over!");
    
            }
           else {
                beginPlayingGame();
            }
    
            beginPlayingGame();
        }
    

    should have just been

    public void tryAgain(View v) {
            if (mInterstitialAd.isLoaded()) {
    
                mInterstitialAd.show();
                Log.v(TAG, "LOADED in Game Over!");
    
            }
           else {
                beginPlayingGame();
            }
        //NOTICE THERE Is NO EXTRA METHOD CALL OF **beginPlayingGame()**
          }
    

提交回复
热议问题