public class SkuDetails extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
SkuDetails.SkuDetailsResult
Result list and code for querySkuDetailsAsync method.
|
| Constructor and Description |
|---|
SkuDetails(String jsonSkuDetails) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o) |
String |
getDescription()
Returns the description of the product.
|
String |
getFreeTrialPeriod()
Trial period configured in Google Play Console, specified in ISO 8601 format.
|
String |
getIconUrl()
Returns the icon of the product if present.
|
String |
getIntroductoryPrice()
Formatted introductory price of a subscription, including its currency sign, such as €3.99.
|
long |
getIntroductoryPriceAmountMicros()
Introductory price in micro-units.
|
String |
getIntroductoryPriceCycles()
The number of subscription billing periods for which the user will be given the introductory
price, such as 3.
|
String |
getIntroductoryPricePeriod()
The billing period of the introductory price, specified in ISO 8601 format.
|
String |
getOriginalJson()
Returns a String in JSON format that contains Sku details.
|
String |
getOriginalPrice()
Returns formatted original price of the item, including its currency sign.
|
long |
getOriginalPriceAmountMicros()
Returns the original price in micro-units, where 1,000,000 micro-units equal one unit of the
currency.
|
String |
getPrice()
Returns formatted price of the item, including its currency sign.
|
long |
getPriceAmountMicros()
Returns price in micro-units, where 1,000,000 micro-units equal one unit of the currency.
|
String |
getPriceCurrencyCode()
Returns ISO 4217 currency code for price and original price.
|
String |
getSku()
Returns the product Id.
|
String |
getSubscriptionPeriod()
Subscription period, specified in ISO 8601 format.
|
String |
getTitle()
Returns the title of the product.
|
String |
getType()
Returns SKU type.
|
int |
hashCode() |
boolean |
isRewarded()
Returns true if sku is rewarded instead of paid.
|
String |
toString() |
public SkuDetails(String jsonSkuDetails) throws JSONException
JSONExceptionpublic String getOriginalJson()
public String getSku()
public String getType()
public String getPrice()
public long getPriceAmountMicros()
For example, if price is "€7.99", price_amount_micros is "7990000". This value represents the localized, rounded price for a particular currency.
public String getPriceCurrencyCode()
For example, if price is specified in British pounds sterling, price_currency_code is "GBP".
public String getOriginalPrice()
The original price is the price of the item before any applicable sales have been applied.
public long getOriginalPriceAmountMicros()
The original price is the price of the item before any applicable sales have been applied.
For example, if original price is "€7.99", original_price_amount_micros is "7990000". This value represents the localized, rounded price for a particular currency.
public String getTitle()
public String getDescription()
public String getSubscriptionPeriod()
Note: Returned only for subscriptions.
public String getFreeTrialPeriod()
Note: Returned only for subscriptions which have a trial period configured.
public String getIntroductoryPrice()
Note: Returned only for subscriptions which have an introductory period configured.
public long getIntroductoryPriceAmountMicros()
Note: Returned only for subscriptions which have an introductory period configured.
public String getIntroductoryPricePeriod()
Note: Returned only for subscriptions which have an introductory period configured.
public String getIntroductoryPriceCycles()
Note: Returned only for subscriptions which have an introductory period configured.
public String getIconUrl()
public boolean isRewarded()
BillingClient.loadRewardedSku(com.android.billingclient.api.RewardLoadParams, com.android.billingclient.api.RewardResponseListener) before attempting to launch purchase for in order to
ensure the reward is available to the user.