Stay organized with collections Save and categorize content based on your preferences.

ProductDetails

public final class ProductDetails
extends Object

java.lang.Object
   ↳ com.android.billingclient.api.ProductDetails
Included in documentation by the annotations: @Annotations.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.  Included in documentation by the annotations: @Annotations.OneTimeProductDetails ,   @Annotations.ProductDetails

class ProductDetails.PricingPhase

Represents a pricing phase, describing how a user pays at a point in time.  Included in documentation by the annotations: @Annotations.ProductDetails

class ProductDetails.PricingPhases

Pricing phases for purchasing an item through a offer.  Included in documentation by the annotations: @Annotations.ProductDetails

@interface ProductDetails.RecurrenceMode

Recurrence mode of the pricing phase.  Included in documentation by the annotations: @Annotations.ProductDetails

class ProductDetails.SubscriptionOfferDetails

Represents the available purchase plans to buy a subscription product.  Included in documentation by the annotations: @Annotations.ProductDetails

Public methods

boolean equals(Object o)
String getDescription()

Returns the description of the product. Included in documentation by the annotations: @Annotations.ProductDetails

String getName()

Returns the name of the product being sold. Included in documentation by the annotations: @Annotations.ProductDetails

ProductDetails.OneTimePurchaseOfferDetails getOneTimePurchaseOfferDetails()

Returns the offer details of an one-time purchase product. Included in documentation by the annotations: @Annotations.OneTimeProductDetails

String getProductId()

Returns the product's Id. Included in documentation by the annotations: @Annotations.ProductDetails

String getProductType()

Returns the BillingClient.ProductType of the product. Included in documentation by the annotations: @Annotations.ProductDetails

List<ProductDetails.SubscriptionOfferDetails> getSubscriptionOfferDetails()

Returns a list containing all available offers to purchase a subscription product. Included in documentation by the annotations: @Annotations.ProductDetails

String getTitle()

Returns the title of the product being sold. Included in documentation by the annotations: @Annotations.ProductDetails

int hashCode()
String toString()

Inherited methods

Public methods

equals

public boolean equals (Object o)

Parameters
o Object

Returns
boolean

getDescription

public String getDescription ()
Included in documentation by the annotations: @Annotations.ProductDetails

Returns the description of the product.

Returns
String

getName

public String getName ()
Included in documentation by the annotations: @Annotations.ProductDetails

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 ()
Included in documentation by the annotations: @Annotations.OneTimeProductDetails

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

Returns
ProductDetails.OneTimePurchaseOfferDetails

getProductId

public String getProductId ()
Included in documentation by the annotations: @Annotations.ProductDetails

Returns the product's Id.

Returns
String

getProductType

public String getProductType ()
Included in documentation by the annotations: @Annotations.ProductDetails

Returns the BillingClient.ProductType of the product.

Returns
String

getSubscriptionOfferDetails

public List<ProductDetails.SubscriptionOfferDetails> getSubscriptionOfferDetails ()
Included in documentation by the annotations: @Annotations.ProductDetails

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

Note: OfferDetails is only set for SUBS product type. Returns {code @null} for INAPP product type.

Returns
List<ProductDetails.SubscriptionOfferDetails>

getTitle

public String getTitle ()
Included in documentation by the annotations: @Annotations.ProductDetails

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