Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / AdMob SmartBanner settings

Author
Message
tmu
7
Years of Service
User Offline
Joined: 2nd Feb 2017
Location:
Posted: 11th Apr 2017 09:42 Edited at: 11th Apr 2017 09:49
I am having problems getting AdMob ads to show as smart banner ads on Android.

When I create my ads with



My banner ad shows fine at the bottom of the screen. It's not perfectly centered etc. but at least it shows.

But changing the first parameter to 5 for smart banners (according to https://www.appgamekit.com/documentation/Reference/Advert/CreateAdvert.htm):



No ad is shown. I went over to AdMob console and tried to create a new ad unit just to see if there was a specific type for smart banners. But no, it is just "banner". Googled it and there seems to be only setting on "banner" which should work for smart banners as well. So that should be fine.

Looking at the logcat console for Android, there is this message:



This is for a game in portrait mode. And if I run my other game, which is in landscape mode:



So in the first case (Portrait) the problem seems to be the expectation of AdMob SDK to get 360dp vs getting only 320dp space. In the second one (Landscape) it seems to be completely off. The banner space seems to be broken.

Googling around for this error message it seems to come if there is some layout on screen that prevents the smart banner from getting full screen width size for itself. Given that when using the regular banner, for the same game(s), the regular banner also seems to be offset to the right by what could well be that 40dp, is there maybe some issue with banner ad implementation in AppGameKit?

If I run the same game code with only change being to change my AdMob banner codes to iOS version codes, the smart banner works perfectly well in Portrait mode for iOS. Fills whole screen horizontally. In Landscape mode it leaves an odd large gap on the left hand side on iOS but still shows the ad banner filling most of the screen. The main point being that it shows up at least and maybe even works as intended..

Also there is a mention about using old version of Google Play SDK in the log:



Looking at that URL in this message, the latest Google Play services version seems to be 10.2.xxx. Don't know if that has any impact.

So, are AppGameKit smart banners broken on Android or am I just doing it wrong?

Login to post a reply

Server time is: 2024-11-24 16:26:03
Your offset time is: 2024-11-24 16:26:03