'Purchasing multiple items/multi quantity of item in one transaction with android billing library
According to the documentation of Android billing library v4.0+, google has added the ability to purchase multi-quantity of an item.
I enabled the option in Play Console: https://i.stack.imgur.com/OQ6OA.png
But unfortunately the dialog won't allow me to select quantity:
https://i.stack.imgur.com/OQEzA.png
the invoking code looks like this:
billingClient.querySkuDetailsAsync(params.build(),
new SkuDetailsResponseListener() {
@Override
public void onSkuDetailsResponse(BillingResult billingResult,
List<SkuDetails> skuDetailsList) {
Log.d(TAG, "billingDebug: size" + skuDetailsList.size());
if (skuDetailsList.size() > 0){
BillingFlowParams billingFlowParams = BillingFlowParams.newBuilder()
.setSkuDetails(skuDetailsList.get(0))
.build();
String responseCode = billingClient.launchBillingFlow(DetailActivity.this, billingFlowParams).toString();
Log.d(TAG, "billingDebug: response: " + responseCode);
}
}
});
How can i use the billing library to purchase multiple SKUs / multi quantity of a single SKU? Any help would be appreciated. Thanks in Advance.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
