Criando loja para Google Play com IAP e XDK

  • 17 favourites


3,546 visits, 6,148 views



This tutorial hasn't been translated.


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.

Hello this tutorial this originally written in Portuguese in Brazil.

Sorry for the flaws in the translation!

This tutorial is basic and is intended to pass a small sample of how you can start your store with the XDK on Android.

To create this tutorial I got references in the tutorial written by:

Samrock e


What will I learn here?

- Here you will learn how to configure a basic store the Construct 2.

- The configures the XDK to receive your game.

- Creating items on Google Play for sale.

What do I need?

1 A license Construct 2 staff in minimum.

2 An account with Intel XDK.

3 A Google Play developer account.

4 An account with Google Wallet.

With this in hand we can get to our store!

Building in Construct2

When you open the Construct 2 incira objects "IAP" and "Touch" (to create our buttons).

Remember to leave the "Test Mode" to "Yes", switch to "On" only when the project has been finalized and all tested to not receive unnecessary charges.

Also in IAP will set our ID!

This ID is the same ID used in the Construct 2 and XDK ID app.

(Example: ID: com.mycompany.myapp). If you will different error!

Now create some buttons or Sprits and nomei them as + reference to the item buttons:

With our ready and appointed buttons, we will add a variable to receive the amount of purchased eggs, add a "System [On star of layout] to carry our items.

Remember that items must have unique names here and Play google for it to work.

It will be like this:

These Items "ovo10, ovo100" are the same ID names that will have to create on Google Play later!

The button will structure looks like this:

When you click the button it will check that you have the product available for sale.

If the product is available it will be purchased and the value assigned to the indicated variable.

If not he will return with an error message!

The make purchase is normal Google Play, it will open a mini window and ask for the credit card data, and say if the purchase was confirmed or not!

To the other button just copy and paste all change the sprite button and the product Id to "ovo100" and the amount of eggs that the variable will be receiving!

Now just export your project as Cordova and open the XDK!

Configuring the XDK

I will only pass the IAP configuration in the XDK, all other setting of the game you find in the tutorial >>>


<<< Right here!

You will only need to fill 3 things, but first do this:

Select your project and click on the "PLUGINS AND PERMISSIONS" in "CORDOVA 3.X" and then open the "Third-party Plugins" tab and then click the "Get Plugin from the web" button like this:

Now the part that will make your game be exported by the XDK and recognized pelog Google Play as containing "sale in the application."

In "Get Plugin from web" window complete the following information:

Name: IAP

Plugin ID: com.mcm.plugins.androidinappbilling

Repo URL:

This will serve to add a plugin in the XDK to run the IAP smoothly and export to the final file!

Now that we ended up here, but we ended up here, it was easy right? We will go to the Google Play!

Setting up shop in the Google

Personal as I said in the beginning tutorial I am Brazilian and my Google shop is all in Portuguese of Brazil, but to follow the images and make it work in a good!


With your application transferred to google click the app and then "In-App production" (products integrated into the app) and on the "add new product."

After clicking "Add new item" will open a window to place the product ID, this ID is the same name you gave the product in the Construct 2 ("ovo10" and "ovo100").

Create a product for each name ID!

You have to choose between:

- Managed Product: The customer buys only once this type of product;

- Product Unmanaged: "This I do not understand what, but the to buy the same!" One could better explain this part? Thank U!

- Signature: We charge the customer a recurring fee: Monthly, annual or temporary!

By clicking "Continue" will open the product registration section with Title, Description, Price and other things, so you have everything complete confirm!

And presto you have an item to sell in your application!

I hope to help someone with this tutorial that is lost as I was.

If you have any questions that I can answer I will answer and I hope someone who can answer for me! = D

If anyone can edit the part of Managed, Products Unmanaged and Signature, I would be very grateful, why do not quite understand how this works!

See you soon!


  • Order by
Want to leave a comment? Login or Register an account!
  • Olá, tem como você fazer o mesmo processo no COnstruct 3?

    Não consigo entender o IAP Mobile e como cadastrar no Google Play.


  • oi voce esta ai? ainda