如何使AdMob的始终显示在Android上的广告?广告、AdMob、Android

2023-09-09 21:59:36 作者:情深不寿

我知道,仅仅是AdMob的可以填补一定的填充率。不过,我想显示的东西,无论如何,或者它会让我的用户界面不一致。我试图让自家广告,但有时仍然会在广告栏不填。

I know that there is only a certain fill rate that admob can fill. However I want to show something anyway, or it will make my UI inconsistent. I tried to enable the "house ad", but still sometimes the ad bar is not filled.

有没有办法强制AdMob的表现出一定的广告?我相信越来越显示出来,只能是他们的一个好东西更多的广告。否则,我可以手动检查,如果没有广告回来?因此,我可以用我自己的装饰条更换广告吧。

Is there a way to force admob to show some ads? I believe getting more ads displayed can only be a good thing for them. Otherwise, can I manually check if there is no ad returned? Thus I can replace the ad bar with my own decorating bar.

谢谢

推荐答案

Admob的永远如果可能的话显示广告。如果它不能显示付费广告,它会显示你的房子的广告之一。但是有时仍然不会弹出这样,就像你说的,你要检查它是否出现,如果没有,用别的东西代替它。创建扩展Si​​mpleAdListener一个监听器类。然后重写onFailedToReceiveAd方法,像这样:

Admob will always show an ad if possible. And if it can't show a paid ad, it will show one of your house ads. However sometimes it still doesn't pop up so, like you said, you want to check if it appeared and if not, replace it with something else. Create a listener class that extends SimpleAdListener. Then override the onFailedToReceiveAd method like so:

@Override
            public void onFailedToReceiveAd(AdView adView)
            {
                // TODO Auto-generated method stub
                super.onFailedToReceiveAd(adView);
                //Display your other view here.
            }

检查LunarLander样本,以获得更好的主意。

Check the LunarLander sample to get a better idea.