‹ Amazon Doc Home

Amazon Appstore Integration Guide

For the C++ version of cocos2d-x v3.x - (all other versions)



If you are using Amazon plugin then you must install IAP plugin at first to make it to work.

SDK Version


Open a terminal and use the following command to install the SDKBOX Amazon plugin. Make sure you setup the SDKBOX installer correctly.

$ sdkbox import amazon
$ sdkbox set store amazon

Extra steps

The following step assumes you have already registered as a Amazon Developer in the Amazon Developer Portal and created a new game there.

Setup Android

<meta-data android:name="store" android:value="amazon" />

NOTE: If you submit your apk to other store, such as Google Play, please remove this line or set the store with googleplay, otherwise, you will get wrong configuration for the other store. Example: <meta-data android:name="store" android:value="googleplay" />

$ sdkbox set store googleplay

JSON Configuration

SDKBOX Installer will automatically inject a sample configuration to your sdkbox_config.json, that you have to modify it before you can use it for your own app

Here is an example adding Amazon:

    "amazon" :

How to test

more info https://developer.amazon.com/public/apis/earn/in-app-purchasing

Proguard (optional)

# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
#   public *;

# cocos2d-x
-keep public class org.cocos2dx.** { *; }
-dontwarn org.cocos2dx.**
-keep public class com.chukong.** { *; }
-dontwarn com.chukong.**

# google play service
-keep public class com.google.android.gms.** { public *; }
-dontwarn com.google.android.gms.**

-keep class * extends java.util.ListResourceBundle {
    protected Object[][] getContents();

-keep public class com.google.android.gms.common.internal.safeparcel.SafeParcelable {
    public static final *** NULL;

-keepnames @com.google.android.gms.common.annotation.KeepName class *
-keepclassmembernames class * {
    @com.google.android.gms.common.annotation.KeepName *;

-keepnames class * implements android.os.Parcelable {
    public static final ** CREATOR;

-keep public class com.sdkbox.** { *; }
-dontwarn com.sdkbox.**

-dontwarn com.amazon.**
-keep class com.amazon.** {*;}
-keepattributes *Annotation*


Note: Proguard only works with Release builds (i.e cocos run -m release) debug builds do not invoke Proguard rules.