Use this page with AI

Copy this into your coding assistant and add your request.

Read https://openiap.dev/docs/apis/android/get-billing-choice-info-android and https://openiap.dev/llms.txt. Follow the reading instructions, detailed reference, and linked guides relevant to my task before making changes.
Inspect my existing project and reuse its framework and conventions. Ask me for missing product decisions. Implement the requested behavior and run the applicable checks.
Show the working result, the commands and actual test results, and any remaining limitations. Keep your explanation brief.

My request: [describe what customers should be able to do]
See an example request →

Android getBillingChoiceInfoAndroid

Fetches Google Play Billing Choice display information for developer-rendered choice screens. Available in OpenIAP 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
    )
)