Android getBillingChoiceInfoAndroid

Fetches Google Play Billing Choice display information for developer-rendered choice screens. Available in OpenIAP Spec 2.1.0 and openiap-google 2.3.0; requires Play Billing 9.1.0+.

Wraps BillingClient.getBillingChoiceInfoAsync(...). Call this when isBillingProgramAvailableAndroid('billing-choice') returns choiceScreenType: 'developer-rendered'.

Signature

kt
suspend fun getBillingChoiceInfo(
    params: GetBillingChoiceInfoParamsAndroid
): BillingChoiceInfoAndroid

Parameters#

Pass one GetBillingChoiceInfoParamsAndroid:

  • billingProgram (optional, BillingProgramAndroid) - defaults to 'billing-choice'.
  • playBillingChoiceImageLayout (optional, BillingChoiceImageLayoutAndroid) - defaults to 'rectangular-four-by-one'.
  • userLocale (optional, string | null) - BCP 47 locale tag. Omit it to use the user's default locale.

Returns#

Promise<BillingChoiceInfoAndroid> with:

  • playBillingChoiceImageUrl (string) - Google Play image URL for the requested layout.
  • playBillingLoyaltyInfo (string | null) - Optional Play loyalty text for the user.

Example

kt
val info = openIapStore.getBillingChoiceInfo(
    GetBillingChoiceInfoParamsAndroid(
        billingProgram = BillingProgramAndroid.BillingChoice,
        playBillingChoiceImageLayout = BillingChoiceImageLayoutAndroid.RectangularFourByOne
    )
)