0

I am using PublisherAdView in our app to show banner advertisements. So the requirement is to reload ad every 5 minutes and show each ad for 20 seconds.

Now I am using loadAd method but whenever the second ad load's it shows the previous ad and populates the new ad. So is there any way I can reset the adView after 20 seconds so that I can reload the ad freshly. I know destroy() method is there but according to the documentation we should call this on activity's destroy method.

Does anyone know how to reset the publisheradview??

Thanks

VK.Dev
  • 801
  • 4
  • 11
  • 24
  • 1. reload ad every 5 minutes - possible through admin console to specify time when add should be refreshed ( it takes input in seconds ) 2. There is no way to reset after 20 seconds via admob. You need to write your own timer logic and then remove the adview after 20 seconds and add back before next refresh. But this logic looks very crud – Amod Gokhale Sep 23 '16 at 08:11
  • @AmodGokhale I am able to reload the ad but for a fraction of second it shows the old and populates the new ad..I want to avoid that. – VK.Dev Sep 23 '16 at 08:15
  • please try solutions provided in this link http://stackoverflow.com/questions/4549401/correctly-disable-admob-ads – Amod Gokhale Sep 23 '16 at 09:25

1 Answers1

0

There's no way to clear the content of the PublisherAdView before loading the second ad, I'm afraid.

You can, however, use an AdListener to determine when the second ad has finished loading and show the PublisherAdView afterwards. Just use the onAdLoaded callback.

RedBrogdon
  • 5,113
  • 2
  • 24
  • 31