Save the date! Android Dev Summit is coming to Mountain View, CA on November 7-8, 2018.

SkuDetails

public class SkuDetails
extends Object

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


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 getIntroductoryPrice()

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

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

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()
String toString()

Inherited methods

From class java.lang.Object

Public constructors

SkuDetails

SkuDetails (String jsonSkuDetails)

Parameters
jsonSkuDetails String

Throws
JSONException

Public methods

equals

boolean equals (Object o)

Parameters
o Object

Returns
boolean

getDescription

String getDescription ()

Returns the description of the product.

Returns
String

getFreeTrialPeriod

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

getIntroductoryPrice

String getIntroductoryPrice ()

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

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

Returns
String

getIntroductoryPriceAmountMicros

String getIntroductoryPriceAmountMicros ()

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

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

Returns
String

getIntroductoryPriceCycles

String getIntroductoryPriceCycles ()

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

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

Returns
String

getIntroductoryPricePeriod

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

getPrice

String getPrice ()

Returns formatted price of the item, including its currency sign. The price does not include tax.

Returns
String

getPriceAmountMicros

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

String getPriceCurrencyCode ()

Returns ISO 4217 currency code for price.

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

Returns
String

getSku

String getSku ()

Returns the product Id.

Returns
String

getSubscriptionPeriod

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

String getTitle ()

Returns the title of the product.

Returns
String

getType

String getType ()

Returns SKU type.

Returns
String

hashCode

int hashCode ()

Returns
int

toString

String toString ()

Returns
String