When updating the Google Billing Library to version 7 it marks the enablePendingPurchases() method as obsolete.
Reading the documentation it seems we now need to pass a PendingPurchasesParams object as a parameter to the new enablePurchases() method.
Reading the documentation for PendingPurchasesParams it only has the newBuilder method so I don't know if I could simply use:
billingClient = BillingClient.newBuilder(Settings.this)
.setListener(purchasesUpdatedListener)
.enablePendingPurchases(PendingPurchasesParams.newBuilder().build())
.build();
Or how should I handle this situation?
If you want the same behavior as previously, use the following as stated in the Google Play Billing Library 7.0.0 release notes.
The deprecated
enablePendingPurchases()is functionally equivalent toenablePendingPurchases(PendingPurchasesParams.newBuilder().enableOneTimeProducts().build()).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With