How to: Export app with Admob Ads via Adobe Phonegap Build

Discussion and feedback on Construct 2

Post » Mon Aug 21, 2017 8:29 pm

Adobe's phonegap service, is like cocoon.io but you get one app free without any kind of splash screen to pay to remove.

additionally its only $9.99 a month if you want up to 25 apps

1) Josek5494's Free C2 Admob Plugin - http://tinyurl.com/h6phjon

Install the plugin, and in your app, use the associated plugin actions to load/display your ads when you choose to in your game. (Tip: Load the add at the beginning of your app to prevent app chugging, but then use the "display ad" action to make it visible at the appropriate time. This prevents any buffering from happing mid gameplay etc.

In the plugin properties on the left hand side bar you can enter your admob ad units. Below is the TEST ones by google you can use until you are ready to launch your game with your own ad units (made in the admob webpage)

Also, turn off "test" mode before you launch your final game.

Google's "Test Ad Units"
Banner ca-app-pub-3940256099942544/6300978111
Interstitial ca-app-pub-3940256099942544/1033173712

2) Export your app in C2 using the "Cordova Export"

Open the created config.xml file and add this line:
(It should be in the folder with the rest of the exported app files, but if not check in your construct installation directory eg: c:\program files(x86)\construct2

<plugin name="cordova-plugin-admob-free" />

(above the section that says <engine name="ios" /> < engine = name="android" />


this allows the plugin to work correctly.

3) Use the adobe phonegap build service to build your APK.

You should see cordova-plugin-admob-free listed in your "plugins tab" of your app.

Voila! Try out your apk on your device, or in an emulator like bluestacks. Works like a charm!
B
87
S
44
G
16
Posts: 1,009
Reputation: 17,946

Post » Sun Nov 19, 2017 6:39 am

Thank you for this great plugin!

Recently I am using CocoonAds with SMART display feature. Is there any feature like that in this one? :)
B
28
S
6
G
2
Posts: 30
Reputation: 2,532


Return to Construct 2 General

Who is online

Users browsing this forum: humanescape and 8 guests