A way to check whether SDK stopped periodic banner ad refresh or not

28 views
Skip to first unread message

Rj

unread,
Nov 5, 2024, 4:23:00 AM11/5/24
to Google Mobile Ads SDK Developers
My understanding is that when the app is backgrounded for a long period, let's say an hour, the sdk won't automatically restart periodic ad refreshing even after the app is resumed (correct me if I'm wrong). Currently on app resume I'm checking whether I should request a new ad or not based on the conditions I set, which isn't perfect as it's based on my own estimates. Is there any callback or flag we can utilize to check whether the sdk stopped periodic ad refresh or not? If it doesn't exist, please consider adding it as it'll be a much more accurate way to decide whether to request a new ad or not when the app is returned to the foreground after extended backgrounding

Mobile Ads SDK Forum Advisor

unread,
Nov 5, 2024, 11:27:19 AM11/5/24
to rajj5...@gmail.com, google-adm...@googlegroups.com

Hi, 

Thank you for contacting Google Mobile Ads SDK support team.

I ran Google BannerExample and noticed that the ad refreshes automatically every 60 seconds since refresh is enabled if the app is in foreground mode, but not refreshing when the app is in background mode. Banner ads can refresh automatically after a certain period of time. Yes, ads expire after an hour, you should clear this cache and reload with new ads every hour. In your use case if the app is in background then sdk won't automatically refresh the ad but refresh resumes as soon as the app is in foreground. I think there is no direct callback or a flag specifically to indicate whether the periodci ad refresh has stopped. You can utilize the delegate method “bannerViewDidReceiveAd” to know when the app is returned to the foreground after extended backgrounding. 

This message is in relation to case "ref:!00D1U01174p.!5004Q02vGiBt:ref" (ADR-00274374)

Thanks,
 
Google Logo Mobile Ads SDK Team

 

Reply all
Reply to author
Forward
0 new messages