Ads for Construct 2 and Crosswalk
Here we will show you how to add AdMob* ads to your Construct 2 application exported for Crosswalk. These steps will build your application with the Intel® XDK.
First, sign up for an AdMob account. Before you can serve any AdMob ads you must sign up for an AdMob account at www.admob.com. There is no cost associated with creating an account, or for serving up AdMob ads within your mobile app. If you already have an AdMob account all you need to do, to use the AdMob plugin, is create the appropriate Ad Unit IDs that identify your ad impressions and provide them as part of the AdMob API initialization sequence within your app. A screenshot of the online AdMob tool you use to create the Ad Unit ID is shown below.
Inside Construct 2, add a new object called "Crosswalk Ads", which will display on Android* builds. Here you will configure your "Android ID" - which is the ID for your Android banner id. If you are showing interstitial ads, you will also configure "Android Interstitial" with the id from AdMob. You can set the banner position to top or bottom, and finally set AdMob into Test Mode.

There are three event actions you can interact with.
- Show banner ad - will show a banner ad
- Hide banner ad - will hide/remove the banner ad
- Show fullscreen add - will show the interstitial ad
Exporting
When you are ready to export your application, make sure you export for Crosswalk. You can then bring this project into the Intel® XDK to build. Here, we will need to configure a Cordova plugin that will enable the native AdMob ads. To add the plugin, follow the directions below.
- Go to the projects tab
- Under "CORDOVA 3.X HYBRID MOBILE APP SETTINGS " click Plugins and Permissions
- Click "Third Party Plugins"
- Click "Add a Third-Party Plugin"
- Click "Get Plugin from the Web"
- Enter the following
Name: AdMobPluginPro Plugin ID: com.google.cordova.admob [x] Plugin is located in the Apache Cordova Plugins Registry
Now you can build your app and test it! Before you publish, make sure you disable Test Mode in Construct 2.
