wessy
wessy

Reputation: 79

AdMob interaction with bannerView.Destroy() and bannerView.Hide()

I've managed to get AdMob working on my Android app using Unity but I have a little question that is confusing me:

My banner is working and I have set the refresh rate on the AdMob website to 30 seconds, you start the app the banner is created and then hidden. Whenever I go to the score screen I set it up to display this banner with bannerView.Show() and bannerView.Hide() when I exit the score screen. However, it is always the same advertisement unless I quit the game entirely and re-launch the app, then it is a new ad with the same issue.

I tried to then use bannerView.Destroy() to destroy the add and re-create a new banner entirely whenever I need to show it again.

My problem is: Since the transition from gameplay to score screen usually can take anything from 1 second to minutes and since it's so easy to mess it up, players will be constantly going to that one screen before 30 seconds (which is the minimal limit that Google suggest to refresh their banner) and they will always see a new advertisement.

I'm a little worried to do this and would like to know if this is okay, and also if there is a way for me to fix the banner ad not refreshing unless I create a new one entirely.

I'm building my app with Unity3d using C# and got the "GoogleMobileAds" plugin and there's only one scene on my project.

Upvotes: 0

Views: 3346

Answers (1)

Uri Popov
Uri Popov

Reputation: 2167

In my game I use .Show() and .Destroy() on the banner every time the user passes a level. I would say its safe to do so. A tip: Make sure you are using test ads while testing your builds. About the banner not refreshing maybe its because of the targeting and google simply cant provide a different add. I'm sure that my ads refreshed with just the sample code from the ad mobs website.

Upvotes: 1

Related Questions