Amazon GameCircle is very similar to Apple’s GameCenter. On both platforms the user must create a LeaderBoard, Achievements and In-App Purchases. Each of those require an identifying phrase or ‘Product ID’ in order to be referenced successfully on that platform.
First order of business is to have the appropriate behaviors in your GameSalad game project. You can simultaneously use Amazon and Apple features in your app. Behaviors that are intended for Apple, will not trigger in your Android .apk and the same applies to behaviors intended for Android that are triggered on an Apple device. Our engine is designed to gracefully ignore behaviors on platforms that do not support that behavior.
‘Platforms’ behaviors are intended for all platforms supporting the behavior. For example, the ‘Platform – Login’ behavior will log you into GameCircle or GameCenter depending on what platform the behavior is triggered on.
Getting your Application Set up:
Once your registered with Amazon as a developer you can begin adding your app data. To do this, select Add a New App from Home tab on Amazon’s Developer Dashboard. You will be prompted to indicate the platform you wish to publish for.
Enter all the appropriate information regarding your app on each tab. Once complete, you’re ready to set up GameCircle.
Step 1. Create a Security Profile and Link it to Your Game Configuration
A security profile is a shared group that enables each unique binary of a single application (for example, the HD, SD, free, and paid versions of a game) to have a unique API key that will identify the binary to Amazon.
On the Mobile App Distribution portal, sign in and click the Apps & Services tab, and then click the GameCircle tab. Finally, click Create a Security Profile.
- On the Security Profile Management page, enter a Security Profile Name and Security Profile Description. For Security Profile Name, enter the common title of your game (for example, enter Star Game rather than Star Game HD or Star Game Free). The purpose of the Security Profile Description field is to help you organize your security profiles.
- Click Save.
- Click the GameCircle tab, which now displays a GameCircle configuration management page:
- In the Game Configuration area, in the Select a Security Profile list, select the security profile that you just created and then click Confirm. This will create a new GameCircle configuration linked to this security profile. This is where you will set up your LeaderBoards, Achievements and Testing Nicknames. Testing nicknames are essentially a test user that is linked to an email address. We’ll get more into that later.
Step 2. Look Up the MD5 Signature for Your Keystore
In order for your .apk to communicate with the Amazon servers, you’ll need to set up something called an MD5 Signature. This is generated on Amazon’s website using the MD5 Certificate footprint on the keystore you will be signing your .apk with.
To obtain an API key for GameCircle, you will need to provide the MD5 fingerprint from the certificate that will be used to sign your applications. You can get the MD5 fingerprint by using a command in your terminal window.
The following command can be used to look up the MD5 fingerprint for the debug certificate. Debug keystore files are commonly found in the .android folder in your home directory. In the Terminal app located on your Mac, navigate to the location of your debug certificate.
First, enter this into Terminal to navigate to your home directory
Next, cut and paste this command directly in your terminal window.
keytool -list -v -alias androiddebugkey -keystore ./debug.keystore
The command produces output similar to this:
The values that follow the”MD5:’ text is your signature and is needed to generate the API Key discussed in Step 3. Below is an example of the signature. This value can be cut and pasted from your terminal window into the Amazon webpage.
Production Keystore (Recommended):
To obtain the certificate MD5 fingerprint for your production keystore:
If you do not know the alias associated with that keystore off hand, you can use this command in terminal to find it.
Run this command to display aliases in your keystore:
keytool -list -keystore full_path_to_your_keystore_file
Where “full_path_to_your_keystore_file” is — you guessed it — the full path to your keystore file.
Step 3. Create an API Key and Add it to Your Project
To create the API key for your game, you must have at least one security profile (Step 1.) and an MD5 signature (Step 2.).
Run this command to obtain the MD5 fingerprint:
keytool -list -v -keystore full_path_to_your_keystore_file -alias alias_name
Where, again, “full_path_to_your_keystore_file” is the full path to your keystore file.
- In the Amazon Mobile App Distribution portal, sign in and click the Apps & Services tab.
- On the Security Profile Management page, select the security profile for which you want to create an API key.
- Select the API Keys link and then select the Kindle/Android tab.
- Click Create a New API Key.
- Enter an API Key Name, your Package Name and and your MD5 Signature, and then click Generate.
Note: The Package Name and API Key on Amazon must match the Package Name and API Key entered in GameSalad’s Web Publishing Interface or you game will not communicate with Amazon’s servers. This means GameCircle or In App- Purchase will not work if these values do not match.
After you have successfully generated, the page will display your API key (shown above).
Copy the full API key into GameSalad Creator’s Web Publishing interface before you generate your .apk to ‘bake’ the key into your application. The Package name is located on the Android Platform Tab (PRO Users) or Kindle Platform Tab (Non-PRO and PRO Users). The API Key is entered under the Services tab located on the left hand side of GameSalad’s Web Publishing Interface.
These are the steps that need to be taken to publish to the Amazon store using GameCircle or In-App Purchase:
- Sign up to be a developer with Amazon Mobile App Distribution portal.
- Add your game to the portal.
- Set up your In-App Purchases, Leaderboards and Achievements.
- Locate the MD5 Signature of the Keystore that will be used to sign the APK.
- Generate the API Key (using either the .debug keystore or your normal production keystore) that will be used for that app exclusively.
- Add the API Key to GameSalad’s Web Publishing Interface.
- Ensure the Package Name used to generate the API Key matches the package name in GameSalad’s Web publishing Interface.
- Generate the APK in Web publishing.
- Sign the app with GameSalad Creator using the same keystore that was used to generate the API Key.
- Add the APK to your local Android or Kindle Device for testing.
- Submit the APK to the Amazon Store. (Remember to submit to the Amazon Store, the APK must be generated in Web Publishing using an API Key that uses the MD5 Signature of a production keystore).
For more information, please visit https://developer.amazon.com/sdk/gamecircle.html