how to setup admob ads in construct 2 step by step

0

Stats

4,537 visits, 5,957 views

Tools

Translations

This tutorial hasn't been translated.

License

This tutorial is licensed under CC BY 4.0. Please refer to the license text if you wish to reuse, share or remix the content contained within this tutorial.

Published on 9 Feb, 2018. Last updated 19 Feb, 2019

Hello everyone, in this tutorial i will show you how to setup admob ads in construct 2 .

1- the first things you need is an admob account to create your interstitial or banner ad unit and the admob plugin.

2- in construct double click in your layout then choose admob plugin :

3- after that go to your admob plugin setting → in android tab add your interstitial or your banner id . if you want to test ads set test mode to true. if you want to start earn from your ads set test mode to false.

4- go to event sheet and make a new event, choose system → on start of layout : action → choose admob plugin → preload inters. another action then preload banner ( you can add action → show banner then hide banner when the player start play or then show it again in another action:

5- the best way to add ads is between level. personally, i add my ads when the level complete or the player lose. like that : if player die or time=0 → show interstitial . or when game over screen is visible → show interstitial or when the player click a button → show interstitial.

6- after you finish, export to cordova . i made a previous tutorial to how do that step by step here :

how to make an apk file using cocoon.io

7- now this is the trick : after you export to cordova go to config.xml and add admob sdk to to it :

this is the admob sdk plugin code :

    <plugin name="cordova-plugin-ad-admob-sdk" spec="https://github.com/cranberrygame/cordova-plugin-ad-admob-sdk"/> <!-- If available via Cordova registry; consider changing to an NPM reference. -->

8- now do all steps explained in how to make an apk file using cocoon.io

.

this method is tested by me and i can confirm it work 100% .i hope you enjoy the tutorial and if you have any questions or need help in any step just leave a comment.

  • 1 Comments

  • Order by
Want to leave a comment? Login or Register an account!