AdMob Export to XDK position bug

Hello guys,

I think I may have found a bug with AdMob banner component or with the export tool to XDK.
When you select the position for the banner, it doesn’t matter if you choose bottom or top of the screen, XDK always put as a top banner.

Field not working in yellow.

After exporting to XDK, I found that data.js had the following code:

{"androidBannerId": "REMOVED","androidInterstitialId": "","iosBannerId": "","iosInterstitialId": "","isTesting": true,"name": "BannerMainMenu","overlap": true,"position": "","showOnStartup": false,"type": "AdMobObject::AdMob","variables": [],"behaviors": []}

“position” field was empty! But as it is possible to see in the screenshot, it should be as “Bottom of the screen”.

And as admobruntimeobject.js has the code:

var position = AdMob.AD_POSITION.TOP_CENTER; if (this._position === "Bottom") position = AdMob.AD_POSITION.BOTTOM_CENTER;

this._position === “Bottom” was never true to set position = AdMob.AD_POSITION.BOTTOM_CENTER, keeping the default value: AdMob.AD_POSITION.TOP_CENTER

I edited data.js in XDK to put my admob banner as position “Bottom” (as expected in admobruntimeobject.js) and it worked as expected!

GDevelop Release (UTF8) for linux 64-bit (Running on Ubuntu 14.04 LTS)

Thank you very much!

Yup there was a slight difference between the IDE (that considered that the default position was the bottom one)and the game engine (that considered that the default position was top).
That’s fixed, the IDE will properly display Top by default :slight_smile:

Thanks for reporting this bug :slight_smile: