SkuDetails

public class SkuDetails
extends Object

java.lang.Object
   ↳ com.android.billingclient.api.SkuDetails


This class is deprecated.
Use BillingClient.queryProductDetailsAsync(QueryProductDetailsParams, ProductDetailsResponseListener) instead

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

Summary

Public constructors

SkuDetails(String jsonSkuDetails)

Public methods

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.

int 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 being sold.

String getType()

Returns the BillingClient.SkuType of the SKU.

int hashCode()
String toString()

Inherited methods

Public constructors

SkuDetails

public SkuDetails (String jsonSkuDetails)

Parameters
jsonSkuDetails String

Throws
JSONException

Public methods

equals

public boolean equals (Object o)

Parameters
o Object

Returns
boolean

getDescription

public String getDescription ()

Returns the description of the product.

Returns
String

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.

Returns
String

getIconUrl

public String getIconUrl ()

Returns the icon of the product if present.

Returns
String

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.

Returns
String

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.

Returns
long

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.

Returns
int

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.

Returns
String

getOriginalJson

public String getOriginalJson ()

Returns a String in JSON format that contains SKU details.

Returns
String

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.

Returns
String

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.

Returns
long

getPrice

public String getPrice ()

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

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

Returns
String

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.

Returns
long

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".

Returns
String

getSku

public String getSku ()

Returns the product Id.

Returns
String

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.

Returns
String

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).

Returns
String

getType

public String getType ()

Returns the BillingClient.SkuType of the SKU.

Returns
String

hashCode

public int hashCode ()

Returns
int

See also:

toString

public String toString ()

Returns
String