Unity 3d – How can I know if there is a banner ads shown in the game?

940 views
Skip to first unread message

zijingp...@gmail.com

unread,
Jul 2, 2018, 8:07:20 PM7/2/18
to Google Mobile Ads SDK Developers

Hello Team,

 

I want to know if there is any way that can check if a banner ads has shown in the game? 

 

I know there are some ads events, HandleAdLoaded and HandleAdFailedToLoad, that can check if a banner ads has loaded. But I think they cannot know if a banner ads has shown in the game. 

 

I want to find a way to check if a banner ads is still shown in the game, so that I can request a banner ads again in the game if the old one has disappeared for some reason.

 

Thank you!

 

Regards,

Meng Li

mobileadssdk-a...@google.com

unread,
Jul 3, 2018, 3:10:21 AM7/3/18
to zijingp...@gmail.com, Google Mobile Ads SDK Developers
Hi Meng,

Thanks for contacting us.

Please see my responses to your questions below:

I want to know if there is any way that can check if a banner ads has shown in the game?
I know there are some ads events, HandleAdLoaded and HandleAdFailedToLoad, that can check if a banner ads has loaded. But I think they cannot know if a banner ads has shown in the game.  

Assuming that the Banner View is visible, then you can use the OnAdLoaded event because after you successfully load an Ad, it will automatically display to the Banner View. 

I want to find a way to check if a banner ads is still shown in the game, so that I can request a banner ads again in the game if the old one has disappeared for some reason. 

I'm afraid there's no Ad event to handle the disappearance of the Banner Ads, however, it shouldn't disappear unless you explicitly hide the Banner View in your code or you call the Destroy() method of the BannerView object. If you want to request a new Ad, you can opt to enable the automatic refresh rate of your Banner Ad Unit Id in the AdMob UI.

Regards,
Steven Balan
Mobile Ads SDK Team

zijingp...@gmail.com

unread,
Jul 4, 2018, 11:29:15 PM7/4/18
to Google Mobile Ads SDK Developers
Hi Steven,

I tested my game again. This time I used test project's script in my game and the situation is same. The AdMob banner ads showed around 1 second and then disappeared. Then I opened the test project and changed the test ID with my ads ID, and it has no problem and the AdMob banner ads can show and not disappear.

It seems that the AdMob banner ads always has some problem in my project, either no showing or showed and disappeared immediately. But when I run the test project with my AdMob banner ads, it has no problem.

Do you think it is a problem? Or the reason could be that my game is still developing and not released yet?

I have another question about AdMob Interstitial and Reward ads. I found my AdMob Interstitial and Reward ads have no problem and can show up in Wifi environment, but when I turned off the wifi of my phone and tested them in my mobile date, the ads cannot show up. 

What should I do if I want AdMob ads can show up in both wifi and mobile date environments?

Thank you!

Regards,
Meng Li


mobileadssdk-a...@google.com

unread,
Jul 5, 2018, 3:48:04 AM7/5/18
to zijingp...@gmail.com, Google Mobile Ads SDK Developers
Hi Meng,

Thanks for your initiative to test this on your end and providing us additional helpful information privately.


Please see my responses to your questions below:

Could you please tell me how I can send you a copy or link to my project please? Because my Unity game project is big, I don't know if I can send it to you by email.

You can upload your project in Google Drive and generate a Shareable Link then send the link to us privately.
 
I tested my game again. This time I used test project's script in my game and the situation is same. The AdMob banner ads showed around 1 second and then disappeared. Then I opened the test project and changed the test ID with my ads ID, and it has no problem and the AdMob banner ads can show and not disappear.
 
It seems that the AdMob banner ads always has some problem in my project, either no showing or showed and disappeared immediately. But when I run the test project with my AdMob banner ads, it has no problem.

I checked the script you have shared to us and upon checking, there is nothing out of the ordinary with your code implementation of the SDK. However, it's better if you could provide to us the project where the behavior is reproducible for us to further investigate.

Additionally, I tested your Ad Unit Id in our HelloWorld example app and didn't encounter the immediate disappearance of the Banner Ads behavior. That said, could you check which part of your app you are calling the Destroy() method of the Banner View?

Do you think it is a problem? Or the reason could be that my game is still developing and not released yet? 

If your app is not yet published in the Apple App Store or Google Play Store, it shouldn't result to the behavior you have mentioned.

I have another question about AdMob Interstitial and Reward ads. I found my AdMob Interstitial and Reward ads have no problem and can show up in Wifi environment, but when I turned off the wifi of my phone and tested them in my mobile date, the ads cannot show up.
 
What should I do if I want AdMob ads can show up in both wifi and mobile date environments? 

As long as there is internet connection, there should be no difference if you are using WIFI or Mobile Data on your devices.
Reply all
Reply to author
Forward
0 new messages