Admob Banner ad not refreshing automatically after sometime

1,880 views
Skip to first unread message

Ali asjad

unread,
Oct 9, 2019, 2:35:24 PM10/9/19
to Google Mobile Ads SDK Developers

i am loading banner ad on an overlay view using WindoManager and calling adView.pause() when my view is not visible and calling adView.Resume() when my view comes to foreground.i have configured autorefresh time to 30 seconds from Admob settings i am facing weird issue if the view show often like after 5 to 10 minutes banner ad is refreshing automatically but when if the view gone for like 1 hour or more after that my views show last loaded banner ad but not refreshing ad always stay like that never refresh itself i have to call loadAd() to work it again i don't want to call loadAd() again again .Is there some timer in Admob Sdk that checks if adView is not visible for a long time or paused to save cpu cycles? why adView.resume() not resuming the time for autorefresh in sdk? or i am doing something wrong?


Mobile Ads SDK Forum Advisor Prod

unread,
Oct 9, 2019, 4:37:14 PM10/9/19
to mianal...@gmail.com, google-adm...@googlegroups.com

Hello Ali,

Thanks for reaching out to us. The pause() and resume() callbacks are only forwarded to the WebView in the AdView. The SDK checks if the AdView is visible to user and only pings impressions and auto refreshes the ad if it's visible to the user. Make sure that the Ad is visible to the user and then make the ad request. And the auto refresh would also be called if this is the case. You can use onAdImpression() to determine when this happens. As soon as the AdView is visible to the user this method will be called.

Let us know if you need anything else.

Regards,
Deepika Uragayala
Mobile Ads SDK Team



ref:_00D1U1174p._5001UKMlwv:ref

Ali asjad

unread,
Oct 10, 2019, 2:26:39 AM10/10/19
to Google Mobile Ads SDK Developers
you are not understanding my issue. if i call adView.pause() adn return to my app after some time within 10 minutes then i resume the banner it refreshing automatically but if i come back to my app after approx 1 hour then i call resume on ad but after long time banner ad doest not refreshing automatically and never refresh itself i have to call loadAd() again is there some timer in admob sdk? can you redirect the technical team with me?or this is some kind of bug

Mobile Ads SDK Forum Advisor Prod

unread,
Oct 10, 2019, 4:22:04 PM10/10/19
to mianal...@gmail.com, google-adm...@googlegroups.com

Hello Ali,

The pause() and resume() callbacks only forward to the WebView of the AdView and does not impact the auto refresh rate of the Banner. Is the Banner AdView reference still valid when you are trying to show to the user after an hour? Can you please provide us steps to reproduce this issue?



Regards,
Deepika Uragayala
Mobile Ads SDK Team



ref:_00D1U1174p._5001UKMlwv:ref

Ali asjad

unread,
Oct 12, 2019, 4:13:59 AM10/12/19
to google-adm...@googlegroups.com

ok now listen to me carefully i am using overlay view in foreground service and i am using banner ad view in that overlay view  i load banner using loadAd() method in onCreate() method of service means only first time when service run after that i don't call loadAD() because i want to refresh it automatically when my view become visible to user i call adview.resume() and when my view gone or hide i call adview.pause() now the issue is if the view becomes visible after some time like say 10 to 15 minutes adview works fine and start to autorefresh but if my view went for like 1 hour i don't know the exact time but after long if the the my view becomes visible the banner ad stops autorefresh whether i call adView.resume() but its not working at all and last loaded ad always showing but not refreshing anymore i hope you understood my issue and remember that if we call adview.pause() it does not autorefresh in background
and answer to your question yes it is valid because service is always running in the background it never stops or destroy 

Mobile Ads SDK Forum Advisor Prod

unread,
Oct 14, 2019, 3:42:51 PM10/14/19
to mianal...@gmail.com, google-adm...@googlegroups.com

Hello there,

Ok, I understood what you assumed the issue might be but let me try and reexplain. The AdView pause() and resume() are not/ have no link to the auto refresh property of the Banner. This simply acts in relaying the callbacks back to the WebView of the AdView and is no where linked to the auto refresh. By calling resume(), the AdView will not trigger any resume of AdRequest or resume of auto refresh or resume the Ad itself in any way. This is an internal callback that is being passed to the WebView. You can read more about WebView here

Now let me try and debug the issue here. My assumption here is the AdView not having a valid reference or there might be some other underlying condition. Can you provide us with complete device logs and also send us a sample app for us to try and reproduce the issue? Or at least provide us with code snippets? We will then have a look into this and can assist you further. You can use "Reply Privately to Author" option to share the details privately.

Ali asjad

unread,
Oct 20, 2019, 9:45:23 AM10/20/19
to google-adm...@googlegroups.com
Create a foreground service and inflate a view in that service using window manager and put an adview inside it now put two buttons in notification hdie and show when click hide pause the Adview and set the view visibility to gone and at the click on show make view visible and call resume of Adview and make the view visible now hide the view and make it visible after like 2 hours then you will see that adview will not automatically refresh now i have explained all the scenario that is bug inside Adview check it
Reply all
Reply to author
Forward
0 new messages