Is there a way to preload AdMob ads on Android?

I have an AdMob ad in a "dialog" (the view I created to look like one because the ads are not suitable in a regular dialog) in my application. It usually takes about 4 or 5 seconds to load, and since the user most likely clicks the button in the dialog box (closes the dialog) before the ad is loaded.
Is there a way that I can preload the ads so that they appear as soon as their containing view has been created?

+4
source share
2 answers

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

  • place the AdMob banner inside FrameLayout along with the placeholder view (e.g. image, etc.)
  • implement "public void onReceiveAd (announcement)" to exchange views, since you know that a banner has appeared.

on the other hand,
(my humble opinion) with a banner inside Dialog, by its nature, is not the best place.
I would suggest placing a banner only in the main activities, this is where the user spends most of his time.

0
source

I did this using one ad unit several times and in several actions

It just loads once, and you can use it wherever you want,

It will update at the specified refresh rate.

demo is provided here

you may need some change, but the actual idea is implemented.

0
source

All Articles