Good evening all,
the new google play library has broken my code. I use the following code to buy subscriptions. I used to get the SKUDetails as it is described in the relevant project in GooglePlayBilling library thread and then I was sending in the following sub the billing client the skudetails and an empty string for offertoken and it used to work, but now it requires to send the offertoken as it breaks with the empty string. I tried to see in skudetails the json and I found this inside it:
I tried to send this value but I get an error saying "error while retrieving information from server DF-DFERH-01 on Google Play". Am I doing something wrong? Has anyone tried to buy a subscription successfully with Google Play Billing Library 7.00? If yes can you post the relevant code?
the new google play library has broken my code. I use the following code to buy subscriptions. I used to get the SKUDetails as it is described in the relevant project in GooglePlayBilling library thread and then I was sending in the following sub the billing client the skudetails and an empty string for offertoken and it used to work, but now it requires to send the offertoken as it breaks with the empty string. I tried to see in skudetails the json and I found this inside it:
{"offerIdToken":"AbNbjn55OK97+mBgvQQcH2Y0...................O0w+AUJpn6s0GloqRS6lGNGkdIFoFvgQ+G8hzi27OEvCSCA4=",......
I tried to send this value but I get an error saying "error while retrieving information from server DF-DFERH-01 on Google Play". Am I doing something wrong? Has anyone tried to buy a subscription successfully with Google Play Billing Library 7.00? If yes can you post the relevant code?
B4X:
Private Sub LaunchBillingFlow (Client As BillingClient, Sku As SkuDetails, OfferToken As String) As BillingResult
Dim ctxt As JavaObject
ctxt.InitializeContext
Dim ProductDetailsParamsBuilder As JavaObject
ProductDetailsParamsBuilder = ProductDetailsParamsBuilder.InitializeStatic("com.android.billingclient.api.BillingFlowParams.ProductDetailsParams").RunMethod("newBuilder", Null)
ProductDetailsParamsBuilder.RunMethod("setProductDetails", Array(Sku))
ProductDetailsParamsBuilder.RunMethod("setOfferToken", Array(OfferToken))
Dim ProductDetails As List = Array(ProductDetailsParamsBuilder.RunMethod("build", Null))
Dim BillingFlowParamsBuilder As JavaObject
BillingFlowParamsBuilder = BillingFlowParamsBuilder.InitializeStatic("com.android.billingclient.api.BillingFlowParams").RunMethod("newBuilder", Null)
BillingFlowParamsBuilder.RunMethod("setProductDetailsParamsList", Array(ProductDetails))
Return Client.As(JavaObject).GetFieldJO("client").RunMethod("launchBillingFlow", Array(ctxt, BillingFlowParamsBuilder.RunMethod("build", Null)))
End Sub
Last edited: