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 getBillingChoiceInfoAndroidFetches 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'.
Requires an open connection
React Native / Expo: wait for the hook's connected flag, or call initConnection() and require a true result. Android does not connect implicitly; a disconnected call rejects with not-prepared. iOS can connect on demand, but the same gate keeps behavior consistent across platforms.
Signature suspend fun getBillingChoiceInfo(
params: GetBillingChoiceInfoParamsAndroid
): BillingChoiceInfoAndroidTypeScript example getBillingChoiceInfoAndroid(
params: GetBillingChoiceInfoParamsAndroid
): Promise<BillingChoiceInfoAndroid>Dart example Future<BillingChoiceInfoAndroid> getBillingChoiceInfoAndroid({
required BillingProgramAndroid billingProgram,
required BillingChoiceImageLayoutAndroid playBillingChoiceImageLayout,
String? userLocale,
});C# (MAUI) example Task<BillingChoiceInfoAndroid> GetBillingChoiceInfoAndroidAsync(
GetBillingChoiceInfoParamsAndroid @params
);Kotlin (KMP) example suspend fun getBillingChoiceInfoAndroid(
params: GetBillingChoiceInfoParamsAndroid
): BillingChoiceInfoAndroidGDScript example func get_billing_choice_info_android(
params: GetBillingChoiceInfoParamsAndroid
) -> BillingChoiceInfoAndroidParameters# 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 val info = openIapStore.getBillingChoiceInfo(
GetBillingChoiceInfoParamsAndroid(
billingProgram = BillingProgramAndroid.BillingChoice,
playBillingChoiceImageLayout = BillingChoiceImageLayoutAndroid.RectangularFourByOne
)
)TypeScript example import { getBillingChoiceInfoAndroid } from 'expo-iap';
if (Platform.OS === 'android') {
const info = await getBillingChoiceInfoAndroid({
billingProgram: 'billing-choice',
playBillingChoiceImageLayout: 'rectangular-four-by-one',
});
}Dart example if (Platform.isAndroid) {
final info = await FlutterInappPurchase.instance.getBillingChoiceInfoAndroid(
billingProgram: BillingProgramAndroid.BillingChoice,
playBillingChoiceImageLayout:
BillingChoiceImageLayoutAndroid.RectangularFourByOne,
);
}C# (MAUI) example var info = await ((QueryResolver)OpenIapClient.Instance).GetBillingChoiceInfoAndroidAsync(
new GetBillingChoiceInfoParamsAndroid
{
BillingProgram = BillingProgramAndroid.BillingChoice,
PlayBillingChoiceImageLayout = BillingChoiceImageLayoutAndroid.RectangularFourByOne,
});Kotlin (KMP) example val info = kmpIAP.getBillingChoiceInfoAndroid(
GetBillingChoiceInfoParamsAndroid(
billingProgram = BillingProgramAndroid.BillingChoice,
playBillingChoiceImageLayout = BillingChoiceImageLayoutAndroid.RectangularFourByOne
)
)GDScript example if iap.get_platform() == "Android":
var params = GetBillingChoiceInfoParamsAndroid.new()
params.billing_program = BillingProgramAndroid.BILLING_CHOICE
params.play_billing_choice_image_layout = BillingChoiceImageLayoutAndroid.RECTANGULAR_FOUR_BY_ONE
var info = await iap.get_billing_choice_info_android(params)