public final class BillingHelper extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
EXTRA_PARAM_KEY_SUBS_PRICE_CHANGE |
static String |
INAPP_CONTINUATION_TOKEN |
static String |
LIBRARY_VERSION_KEY
Field's key to hold library version key constant.
|
static int |
NUMBER_OF_CORES
Total number of cores of current device
|
static String |
RESPONSE_BUY_INTENT_KEY
Key in the response bundle of getBuyIntent for the purchase intent
|
static String |
RESPONSE_CODE |
static String |
RESPONSE_GET_SKU_DETAILS_LIST |
static String |
RESPONSE_INAPP_ITEM_LIST |
static String |
RESPONSE_INAPP_PURCHASE_DATA_LIST |
static String |
RESPONSE_INAPP_SIGNATURE_LIST |
static String |
RESPONSE_SUBS_MANAGEMENT_INTENT_KEY
Key in the response bundle of getSubsManagement for the subs management intent
|
| Constructor and Description |
|---|
BillingHelper() |
| Modifier and Type | Method and Description |
|---|---|
static List<Purchase> |
extractPurchases(Bundle bundle)
Gets a purchase data and signature (or lists of them) from the Bundle and returns the
constructed list of
Purchase |
static int |
getResponseCodeFromBundle(Bundle bundle,
String tag)
Retrieves a response code from the bundle
|
static int |
getResponseCodeFromIntent(Intent intent,
String tag)
Retrieves a response code from the intent
|
static void |
logVerbose(String tag,
String msg)
Logs a verbose message
|
static void |
logWarn(String tag,
String msg)
Logs a warning message
|
public static final String RESPONSE_CODE
public static final String RESPONSE_GET_SKU_DETAILS_LIST
public static final String RESPONSE_BUY_INTENT_KEY
public static final String RESPONSE_SUBS_MANAGEMENT_INTENT_KEY
public static final String RESPONSE_INAPP_ITEM_LIST
public static final String RESPONSE_INAPP_PURCHASE_DATA_LIST
public static final String RESPONSE_INAPP_SIGNATURE_LIST
public static final String INAPP_CONTINUATION_TOKEN
public static final String LIBRARY_VERSION_KEY
public static final String EXTRA_PARAM_KEY_SUBS_PRICE_CHANGE
public static int NUMBER_OF_CORES
public static void logVerbose(String tag, String msg)
tag - Tag to be used inside loggingmsg - Message to logpublic static void logWarn(String tag, String msg)
tag - Tag to be used inside loggingmsg - Message to logpublic static int getResponseCodeFromIntent(Intent intent, String tag)
public static int getResponseCodeFromBundle(Bundle bundle, String tag)
public static List<Purchase> extractPurchases(Bundle bundle)
Purchasebundle - The bundle to parse