Skip to content Skip to sidebar Skip to footer

Gpay Inappsubscription Setskudetails

I am using Gpay In app Subscription and the older version of .setSku is not working anymore, here's my java code that gives an error when I am adding the String SKU key to the .set

Solution 1:

You need to pass skuDetails not String

for (SkuDetails skuDetails : skuDetailsList) {
     Stringsku= skuDetails.getSku();
     Stringprice= skuDetails.getPrice();

     BillingFlowParamsparams= BillingFlowParams.newBuilder()
                   .setSkuDetails(skuDetails)
                   .build();
}

For further reference, refer the documentation: https://developer.android.com/google/play/billing/billing_library_overview

Post a Comment for "Gpay Inappsubscription Setskudetails"