SkuDetails

public class SkuDetails


Represents an in-app product's or subscription's listing details.

Summary

Public constructors

SkuDetails(String jsonSkuDetails)

Public methods

boolean
String

Returns the description of the product.

String

Trial period configured in Google Play Console, specified in ISO 8601 format.

String

Returns the icon of the product if present.

String

Formatted introductory price of a subscription, including its currency sign, such as €3.99.

long

Introductory price in micro-units.

int

The number of subscription billing periods for which the user will be given the introductory price, such as 3.

String

The billing period of the introductory price, specified in ISO 8601 format.

String

Returns a String in JSON format that contains SKU details.

String

Returns formatted original price of the item, including its currency sign.

long

Returns the original price in micro-units, where 1,000,000 micro-units equal one unit of the currency.

String

Returns formatted price of the item, including its currency sign.

long

Returns price in micro-units, where 1,000,000 micro-units equal one unit of the currency.

String

Returns ISO 4217 currency code for price and original price.

String

Returns the product Id.

String

Subscription period, specified in ISO 8601 format.

String

Returns the title of the product being sold.

String

Returns the SkuType of the SKU.

int
String

Public constructors

SkuDetails

public SkuDetails(String jsonSkuDetails)

Public methods

equals

public boolean equals(Object o)
See also
equals

getDescription

public String getDescription()

Returns the description of the product.

getFreeTrialPeriod

public String getFreeTrialPeriod()

Trial period configured in Google Play Console, specified in ISO 8601 format. For example, P7D equates to seven days. To learn more about free trial eligibility, see In-app Subscriptions.

Note: Returned only for subscriptions which have a trial period configured.

getIconUrl

public String getIconUrl()

Returns the icon of the product if present.

getIntroductoryPrice

public String getIntroductoryPrice()

Formatted introductory price of a subscription, including its currency sign, such as €3.99. For tax exclusive countries, the price doesn't include tax.

Note: Returned only for subscriptions which have an introductory period configured.

getIntroductoryPriceAmountMicros

public long getIntroductoryPriceAmountMicros()

Introductory price in micro-units. The currency is the same as price_currency_code.

Note: Returns 0 if the SKU is not a subscription or doesn't have an introductory period.

getIntroductoryPriceCycles

public int getIntroductoryPriceCycles()

The number of subscription billing periods for which the user will be given the introductory price, such as 3.

Note: Returns 0 if the SKU is not a subscription or doesn't have an introductory period.

getIntroductoryPricePeriod

public String getIntroductoryPricePeriod()

The billing period of the introductory price, specified in ISO 8601 format.

Note: Returned only for subscriptions which have an introductory period configured.

getOriginalJson

public String getOriginalJson()

Returns a String in JSON format that contains SKU details.

getOriginalPrice

public String getOriginalPrice()

Returns formatted original price of the item, including its currency sign.

The original price is the price of the item before any applicable sales have been applied. For tax exclusive countries, the price doesn't include tax.

getOriginalPriceAmountMicros

public long getOriginalPriceAmountMicros()

Returns the original price in micro-units, where 1,000,000 micro-units equal one unit of the currency.

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.

getPrice

public String getPrice()

Returns formatted price of the item, including its currency sign.

For tax exclusive countries, the price doesn't include tax.

getPriceAmountMicros

public long getPriceAmountMicros()

Returns price in micro-units, where 1,000,000 micro-units equal one unit of the currency.

For example, if price is "€7.99", price_amount_micros is "7990000". This value represents the localized, rounded price for a particular currency.

getPriceCurrencyCode

public String getPriceCurrencyCode()

Returns ISO 4217 currency code for price and original price.

For example, if price is specified in British pounds sterling, price_currency_code is "GBP".

getSku

public String getSku()

Returns the product Id.

getSubscriptionPeriod

public String getSubscriptionPeriod()

Subscription period, specified in ISO 8601 format. For example, P1W equates to one week, P1M equates to one month, P3M equates to three months, P6M equates to six months, and P1Y equates to one year.

Note: Returned only for subscriptions.

getTitle

public String getTitle()

Returns the title of the product being sold.

The title includes the name of the app which owns the product. Example: 100 Gold Coins (Coin selling app).

getType

public String getType()

Returns the SkuType of the SKU.

hashCode

public int hashCode()
See also
hashCode

toString

public String toString()