public class InAppPurchaseLibrary
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
DEVELOPER_PAYLOAD |
static java.lang.String |
PRODUCT_ID |
static java.lang.String |
PURCHASE_TOKEN |
| Constructor and Description |
|---|
InAppPurchaseLibrary() |
| Modifier and Type | Method and Description |
|---|---|
static void |
consumePurchase(android.content.Context context,
org.json.JSONObject parameters,
DaemonRequest.Callback callback)
Consumes a specific purchase belonging to the current player.
|
static void |
getCatalog(android.content.Context context,
org.json.JSONObject parameters,
DaemonRequest.Callback callback)
Fetches the game's product catalog.
|
static void |
getPurchases(android.content.Context context,
org.json.JSONObject parameters,
DaemonRequest.Callback callback)
Fetches all of the player's unconsumed purchases.
|
static void |
onReady(android.content.Context context,
org.json.JSONObject parameters,
DaemonRequest.Callback callback)
Sets a callback to be triggered when Payments operations are available.
|
static void |
purchase(android.content.Context context,
org.json.JSONObject parameters,
DaemonRequest.Callback callback)
Begins the purchase flow for a specific product.
|
public static final java.lang.String PRODUCT_ID
public static final java.lang.String PURCHASE_TOKEN
public static final java.lang.String DEVELOPER_PAYLOAD
public static void onReady(android.content.Context context,
@Nullable
org.json.JSONObject parameters,
DaemonRequest.Callback callback)
context - the application contextparameters - {}callback - callback for success and errorpublic static void getCatalog(android.content.Context context,
@Nullable
org.json.JSONObject parameters,
DaemonRequest.Callback callback)
context - the application contextparameters - {}callback - callback for success and errorpublic static void getPurchases(android.content.Context context,
@Nullable
org.json.JSONObject parameters,
DaemonRequest.Callback callback)
context - the application contextparameters - {}callback - callback for success and errorpublic static void purchase(android.content.Context context,
org.json.JSONObject parameters,
DaemonRequest.Callback callback)
context - the application contextparameters - { PRODUCT_ID: callback - callback for success and errorpublic static void consumePurchase(android.content.Context context,
org.json.JSONObject parameters,
DaemonRequest.Callback callback)
context - the application contextparameters - { PURCHASE_TOKEN: callback - callback for success and error