Is there a way to preload AdMob ads on Android?

后端 未结 3 1232
鱼传尺愫
鱼传尺愫 2021-01-19 02:13

I have a AdMob ad in a \"dialog\" (a View I created to look like one, because ads will not fit in a normal Dialog) in my app. Usually it takes about 4 or 5 seconds before th

3条回答
  •  温柔的废话
    2021-01-19 02:28

    So your problem is the empty banner space? if is that so, an alternative solution to avoid empty banner space as below;

    • put AdMob banner inside FrameLayout together with placeholder view (e.g. image etc)
    • implement "public void onReceiveAd(Ad ad)" to swap views as u know the banner arrived.

    on the other hand,
    (my humble opinion) having banner inside Dialog, by nature, is not optimum place.
    I would suggest to place the banner on main Activity views only, this is where user spends most of their time.

提交回复
热议问题