Android BillingFlowParams 接受多个订阅

Android BillingFlowParams accept multiple subscriptions

在尝试显示多个订阅选项时,我看不到在哪里可以将一组 SkuDetails 传递到计费流程。那是对的吗? Billing UI 不处理多个 SkuDetails 吗?

Log.d(TAG_BILLING, "Getting SKU Details");
        billingClient.querySkuDetailsAsync(skuDetailsParams, new SkuDetailsResponseListener() {
            @Override
            public void onSkuDetailsResponse(BillingResult billingResult,
                                             List<SkuDetails> skuDetailsList) {
                Log.d(TAG_BILLING, "Details Returned an RC of : " + billingResult.getResponseCode());
                SkuDetails mySKU = null;
                if (billingResult.getResponseCode() == BillingClient.BillingResponseCode.OK && skuDetailsList != null) {
                    for (SkuDetails skuDetails : skuDetailsList) {
                        mySKU = skuDetails; // <-- Tests a single one
                        String sku = skuDetails.getSku();
                        String price = skuDetails.getPrice();
                        Log.d(TAG_BILLING, "SKU: " + sku + " and price: " + price);
                    }
                    BillingFlowParams flowParams = BillingFlowParams.newBuilder()
                            .setSkuDetails(mySKU) // <-- want to pass multiple but wont take a list
                            .build();
                    BillingResult responseCode = billingClient.launchBillingFlow(WebViewActivity.this, flowParams);                }
                else {
                    Log.d(TAG_BILLING, "NO SKU's found");
                }

            }

我错过了什么才能让 UI 显示多个订阅选项?

What am I missing to allow the UI to show multiple Subscription options?

计费库无法显示购买选项列表,您必须编写代码并显示自己的列表

// <-- want to pass multiple but wont take a list .build();

商品只能一件一件购买,所以BillingFlowParamslaunchBillingFlow()只接受一个sku,不接受list