Saturday, March 23, 2019

How to add admob to your Construct 2 game

Now that cocoon.io is dead, we have to use phonegap for admob.

Follow this youtube video instructions:

https://www.youtube.com/watch?v=Idiz1QaS_EY

Download the admob plugin mentioned therein:  http://tinyurl.com/h6phjon
Copy the plugin to your Construct 2 plugin folder.

Then:

Step 1: Insert admob plugin v 1.0 , also your banner and interstitial ad ids from here:


 Also, in the properties section, set Test mode to True. 



Step 2: Create Admob sheet with these functions:



Step 3: Call your ads in the on start layout event





Step 4: Export a cordova project with these settings:


Step 5:  Delete the config.json file in the exported folder
Step 6:  Edit your config.xml:


Step 7:  Create a github repo and push it there.
Step 8:   Create a new app in your build.phonegap.com console and insert the github repo .git file ref
Step 9:   Build the apk and transfer to your Android phone


Note:
There is a secondary youtube video here:  https://www.youtube.com/watch?v=ZBa2sCFAAuY

But it does not work for banner ads because the guy is using AdmobPlugin v1.2

Only v 1.0 works.




1 comment:

  1. hello, do you offer customized work? I am in need for some ads in my game and need help.

    ReplyDelete