I have
BillingFlowParams purchaseParams = BillingFlowParams.newBuilder().setSku(skuId).setType(billingType).setOldSkus(oldSkus).build();
but now
setSku
setType
setOldSkus
are all deprecated.
I want to update the old code without releasing an update that mess with the active and future subscriptions. How should I properly update the above code?
Currently I use
a String myProduct="my_newsweek_1";
to identify the purchase and BillingClient.SkuType.SUBS
to identify the type,
and I simply pass null
to setOldSkus
Documentation reports that
setSku (String sku)
and setType (String type)
have been replaced with setSkuDetails(SkuDetails)
(this SkuDetails
object receives only a String
as parameter in the constructor and throws JSONException
so seems It doesn't work with old String
constants)
and
setOldSkus(ArrayList<String> oldSkus)
has been replaced with setOldSku(String)