How to get AdMob (official plugin) working on Android-Crosswalk

Index

Attached Files

The following files have been attached to this tutorial:

.capx

admob-display-ads.capx

Download now 188.56 KB
.capx

admob-iap-android.capx

Download now 195.61 KB

Stats

9,715 visits, 33,709 views

Translations

This tutorial hasn't been translated.

Tools

Adding your game to Google Play Developer Console

The Google Play Developer Console allows you to publish and manage the applications you have published to the Google Play store.

The access to this console requires for you to register as a Google Play Developer and pay a fee.

Moreover, be sure to, like with adMob, read all the terms of service and policies to know what you are allowed to publish on the store.

Every publishing (and update) will be reviewed before going live. Even in Alpha and Beta state.

Once in the console, a menu on the left proposes you several items.

You'll want to start at "All applications" once you have set the settings for your account.

Click the "Add new application" button on top right of screen.

Create a new application

This will open up a new dialog asking you the language and default/main language of your application.

You can also notice two buttons at the bottom.

"Upload APK" allows you to directly upload the APK you got from the Intel XDK export.

"Prepare Store Listing" allows you to fill up some of the required informations for the publishing of the application.

You'll need both before publishing.

Upload your APK

Let's start by uploading your APK.

You will be take to the main interface for the management of your application.

In the column on the left, notice several sections.

"APK", "Store Listing", "Content Rating", "Pricing & Distribution", "In App Products", "Services and APIs".

APK is currently selected and the main area to the right contains a table with three tabs named "Production", "Beta Testing" and "Alpha Testing".

These are three stages of publishing of your application.

For now we will want to create the Alpha Testing stage. Click on the tab named "Alpha Testing".

The area mostly contains a button "Upload your first APK to Alpha".

Click it, browse your hard drive to where you have saved your APK out of Intel XDK and start uploading it to Google Play.

(You might want in a first time to chose the AMV dedicated APK. Both APKs are differentiated in their name of what type of CPU they are aimed at).

If ever there is any issue with the APK you are uploading, the window will turn red on the end of upload and display an error message with more informations about what went wrong.

Consult Google Play's documentation if required to understand and fix the issue.

Set your Testing

Once the APK is uploaded, you can chose whether your Alpha should be Closed or Open to the public.

In Closed, you can determine testers, Google accounts that will have access to this APK and be allowed to download it from Google Play and install it on their Android device.

By default your own account is allowed, but you can add others as well that will have this access and be able to test your application.

Open allows pretty much anyone (who choses to) to be able to test out your application and you can set an URL or email address where to send feedback.

The same kind of testing will go for Beta as well.

Alpha is supposed to be a far earlier state than Beta and is meant for early tests.

Beta can run alongside Production, in order to test out the next update for example.

Production is the version any person can download in the Google Play store, and/or reaching to the URL of your application.

Share with your tester the "Opt-in URL" so they can be confirmed as testers and download the application.

To obtain that link, you'll first have to publish your game.

Draft to Publishing

Notice in the top right the two buttons "Save Draft" and "Publish".

"Save Draft" let's you save each state of informations you have filled for your game.

Currently, we "only" have uploaded an APK and set a testing phase.

Our application is merely a "draft" of an application to which we need to fill before being allowed to publish it.

"Publish" is greyed currently meaning you cannot, yet, publish your application.

The link on top of that button "Why can't I publish?" is an important tool that will display a dialog of the missing steps before you can publish your game.

You may see you'll need to create "art", a certain number of screenshots of your application as well as an hi-res icon and upload them to the store.

You'll also need to set up a lot of informations for your application (category, price, etc...) as well as some elements for your account.

You can come back on a regular basis to this dialog after each steps/time you saved your draft to see how much items/elements you still need to complete before being allowed to publish.

All is done in the left column menu we've seen previously.

Be sure to "Save Draft" and then click "Store Listing", the second option that was proposed to us when creating the application at first.

Completing the Store Listing

The interface in the console should be quite explicit and allow you to keep on completing the informations required.

Most items contains also a "Read more" link that explains further what is expected.

Moreover, on the left column a little green check will appear once all required elements have been completed.

Fill the Title, Short and Full Descriptions for your application.

Provide the expected Graphic Assets (icon, screenshots...)

And chose the Categorisation options as well as your Contact Details.

A little subtlety comes for the Content Rating.

A questionnaire made of option boxes is proposed to you, and at the very bottom, you can save it, which then proposes you a button "Calculate Rating"

Be sure to read carefully all the informations provided and answer truthfully to the questions.

Click the button.

The page changes and propose you different "badges".

Scroll down to the bottom of the page and click the "Apply rating" button.

You can now see that on the left column the "Content Rating" line does have a little green icon to its right.

Your application's content has been rated.

Finally set the "Pricing and Distribution" accordingly and your application should now be ready for publish.

Click the "Publish app" button and wait.

This is a bit of a frustrating part as it may take a few hours for your application to be reviewed and published.

Check out on a regular basis until the application is published and you have the "Opt-in URL" in the "APK" section.

You'll also notice that the left column, once published, contains more elements on top that allow you to have a better management of your application.

REMINDER

Once published, that may be the good time to go back into AdMob's interface and link your application.

To do so, you will go into the "Home" tab of AdMob, scroll the page down until you get some table containing all your registered applications.

You'll see under the icon a blue link "Link you app".

Simply click that link and follow the instruction to find and link your application/game once you have published it (even in Alpha) from the Google Play Developer console.

Final comments on AdMob

You can now share the test link with your testers and, after installation of your application on the test devices, your application should display ads according to the adUnit type you have set up for it in AdMob.

Remember for any update to your APK to modify the "App Version Code" in XDK by increment of 1.

Updating the version of your code/application sounds also like a good practice to follow.

Remember to modify the adMob plugin property "Test Mode" to "No" in Construct 2 in your final (production) version before uploading it to Google Play Console.

Those steps may be subjects to change if ever, since the writing of this article, adMob, XDK or even Google Play have been updated and their interface modified.

To finish up, here is a short video showing the Ad Displaying application (which is the capx you can download) on my Nexus 7 (2012).

Subscribe to Construct videos now
  • 0 Comments

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