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

BillingFlowParams.ProductDetailsParams.Builder

public static class BillingFlowParams.ProductDetailsParams.Builder
extends Object

java.lang.Object
   ↳ com.android.billingclient.api.BillingFlowParams.ProductDetailsParams.Builder
Included in documentation by the annotations: @Annotations.ProductDetails

Helps to construct a BillingFlowParams.ProductDetailsParams.

Summary

Public methods

BillingFlowParams.ProductDetailsParams build()

Construct a BillingFlowParams.ProductDetailsParams. Included in documentation by the annotations: @Annotations.ProductDetails

BillingFlowParams.ProductDetailsParams.Builder setOfferToken(String offerToken)

Specifies the identifier of the offer to initiate purchase with. Included in documentation by the annotations: @Annotations.ProductDetails

BillingFlowParams.ProductDetailsParams.Builder setProductDetails(ProductDetails productDetails)

Specifies the details of item to be purchased, fetched via BillingClient.queryProductDetailsAsync(QueryProductDetailsParams, ProductDetailsResponseListener). Included in documentation by the annotations: @Annotations.ProductDetails

Inherited methods

Public methods

build

public BillingFlowParams.ProductDetailsParams build ()
Included in documentation by the annotations: @Annotations.ProductDetails

Construct a BillingFlowParams.ProductDetailsParams.

Returns
BillingFlowParams.ProductDetailsParams

setOfferToken

public BillingFlowParams.ProductDetailsParams.Builder setOfferToken (String offerToken)
Included in documentation by the annotations: @Annotations.ProductDetails

Specifies the identifier of the offer to initiate purchase with.

A subscriptions product may be associated with multiple offers. To identify offers a user is eligible for, call BillingClient.queryProductDetailsAsync(QueryProductDetailsParams, ProductDetailsResponseListener), which returns all eligible offers and as part of ProductDetails.SubscriptionOfferDetails.getOfferToken(). Use this method to specify which offer the user would like to purchase. Calling this method is not neeed for One-time products.

Parameters
offerToken String

Returns
BillingFlowParams.ProductDetailsParams.Builder

setProductDetails

public BillingFlowParams.ProductDetailsParams.Builder setProductDetails (ProductDetails productDetails)
Included in documentation by the annotations: @Annotations.ProductDetails

Specifies the details of item to be purchased, fetched via BillingClient.queryProductDetailsAsync(QueryProductDetailsParams, ProductDetailsResponseListener).

Parameters
productDetails ProductDetails

Returns
BillingFlowParams.ProductDetailsParams.Builder