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
|
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. |
String
|
getType()
Returns the |
int
|
hashCode()
|
String
|
toString()
|
Inherited methods | |
---|---|
![]()
java.lang.Object
|
Public constructors
SkuDetails
SkuDetails (String jsonSkuDetails)
Parameters | |
---|---|
jsonSkuDetails |
String |
Throws | |
---|---|
JSONException |
Public methods
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 |
getIconUrl
String getIconUrl ()
Returns the icon of the product if present.
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
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
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
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
String getOriginalJson ()
Returns a String in JSON format that contains SKU details.
Returns | |
---|---|
String |
getOriginalPrice
String getOriginalPrice ()
Returns formatted original price of the item, including its currency sign. The price does not include tax.
The original price is the price of the item before any applicable sales have been applied.
Returns | |
---|---|
String |
getOriginalPriceAmountMicros
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
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 and original 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 |
toString
String toString ()
Returns | |
---|---|
String |
Annotations
Interfaces
Classes
- AccountIdentifiers
- AcknowledgePurchaseParams
- AcknowledgePurchaseParams.Builder
- BillingClient
- BillingClient.Builder
- BillingFlowParams
- BillingFlowParams.Builder
- BillingResult
- BillingResult.Builder
- ConsumeParams
- ConsumeParams.Builder
- PriceChangeFlowParams
- PriceChangeFlowParams.Builder
- ProxyBillingActivity
- Purchase
- Purchase.PurchasesResult
- PurchaseHistoryRecord
- SkuDetails
- SkuDetailsParams
- SkuDetailsParams.Builder