ProductDetails

public final class ProductDetails
extends Object

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


Represents the details of a one time or subscription product.

Summary

Nested classes

class ProductDetails.OneTimePurchaseOfferDetails

Represents the offer details to buy an one-time purchase product. 

class ProductDetails.PricingPhase

Represents a pricing phase, describing how a user pays at a point in time. 

class ProductDetails.PricingPhases

Pricing phases for purchasing an item through a offer. 

@interface ProductDetails.RecurrenceMode

Recurrence mode of the pricing phase. 

class ProductDetails.SubscriptionOfferDetails

Represents the available purchase plans to buy a subscription product. 

Public methods

boolean equals(Object o)
String getDescription()

Returns the description of the product.

String getName()

Returns the name of the product being sold.

ProductDetails.OneTimePurchaseOfferDetails getOneTimePurchaseOfferDetails()

Returns the offer details of an one-time purchase product.

String getProductId()

Returns the product's Id.

String getProductType()

Returns the BillingClient.ProductType of the product.

List<ProductDetails.SubscriptionOfferDetails> getSubscriptionOfferDetails()

Returns a list containing all available offers to purchase a subscription product.

String getTitle()

Returns the title of the product being sold.

int hashCode()
String toString()

Inherited methods

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

getName

public String getName ()

Returns the name of the product being sold.

This method is similar to getTitle() but does not include the name of the app which owns the product. Example: 100 Gold Coins

Returns
String

getOneTimePurchaseOfferDetails

public ProductDetails.OneTimePurchaseOfferDetails getOneTimePurchaseOfferDetails ()

Returns the offer details of an one-time purchase product.

Returns
ProductDetails.OneTimePurchaseOfferDetails

getProductId

public String getProductId ()

Returns the product's Id.

Returns
String

getProductType

public String getProductType ()

Returns the BillingClient.ProductType of the product.

Returns
String

getSubscriptionOfferDetails

public List<ProductDetails.SubscriptionOfferDetails> getSubscriptionOfferDetails ()

Returns a list containing all available offers to purchase a subscription product.

Note: OfferDetails is only set for SUBS product type. Returns null for INAPP product type.

Returns
List<ProductDetails.SubscriptionOfferDetails>

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

hashCode

public int hashCode ()

Returns
int

toString

public String toString ()

Returns
String