Exporting your app to Android APK with ad's via Adobe Phonegap Build

1

Stats

2,200 visits, 2,703 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 21 Aug, 2017. Last updated 19 Feb, 2019

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 - 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 happening 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!

  • 0 Comments

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