Before In-App purchases can be tested on an Android device there are a number of things that have to be done. Below is a list of Prerequisites
- You must setup a Google developer account. A $25 one-time fee.
- You must upload an initial build of your game to setup a test application on the developer console.
- You must create a merchant account (Google wallet) from the Google Developer Console
- You have to add a test Google email address other than the main email address of the primary Google developer account holder. This email must be the main account on the test android device.
- You need the Base64 encoded License Key from the app settings in your Google Developer Console.
**Note: PLEASE Make sure to setup a Google developer account with an email address that is different from the primary email address that is on your test device. It is not easy to switch testing account on an Android device. You have been warned :)
Creating A New Application
Go to the Google Developer Console and login to create a new application http://play.google.com/apps/publish/. Click the Add new application button.
Google does things a little backwards. They require you to actually upload a version of your game before you can create an application or test in-app purchases. Create a project in GameBuilder Studio and publish a blank game for Android so that you can create an application in the Google Developer Center. Make sure you are happy with the application Bundle ID, title, p12 certificate, and version number - if these values change, you will need to upload a new draft – and it can take anywhere from minutes to hours before Google processes the APK file!
Set a title and upload the generated .apk file from GameBuilder Studio.
Once your application is created make sure to save the license key for later. This will be needed when setting up your in-app purchases later in GameBuilder Studio.