Closed nerdite closed 6 years ago
Still thinking?
Copy and paste this code into the Javas Script file (obviously editing it by putting in your app ID/ publisher ID). This will make the banner appear on the bottom of the screen. You can go to other help sites on how to edit it and place it on other locations. But for now I used this.
document.removeEventListener('deviceready', onDeviceReady, false);
// Set AdMobAds options:
admob.setOptions({
publisherId: "insert your app id here (if it doesnt work use publisher ID)", // Required
});
admob.createBannerView();
}
document.addEventListener("deviceready", onDeviceReady, false);
admob.createBannerView();
For some reason Gdevelop admob plugin doesnt work doesnt work anymore.
Hi, can you tell me where the file is and as it is called? Can you also explain or place this part of the code in the file?
I'm guessing that you export to Apache Cordova right? So where it converts to (the project folder) go in there, and then to another folder called www, in there there should be a file called 'code' open it with notepad or whatever and put the code at the end. Then save it, and it should be all ready to go!
I use intel XDK with cordova. the first correction of 4ian was to do:
open the file called admobruntimeobject.js in this folder: / JsPlatform / Runtime / Extensions / AdMobObject Paste this at the end: gdjs.AdMobRuntimeObject.prototype.setLayer = function (layer) { Â Â Â Â Â // No renderable object };
gdjs.AdMobRuntimeObject.prototype.setZOrder = function (z) { Â Â Â Â Â // No renderable object }; Save the file Start again GD, open your project and launch a preview.
if I put your code in this file, it blocks again the download
Have you put the admob plugin tag in the .xml file?
Plus does XDK still work? I thought they stopped supporting it?
the soft XDK still work but not the cloud service to build mobile app. To build mobile app I use cordava cli.
Closing this. If there is still an issue, please upload a sample game so that it's easy to test and fix :)
Hi there,
Thank you so much for fixing the crash issue when adding the admob banner. Now we have an entirely different issue. I followed the tutorial on the website installing the cordova admob plugin. I then export and test the game in my emulator and on my phone... but no adverts show.
My banner advert is set to show on startup on my second scene... but nothing shows up. Any ideas?