Hi,
I've been developing an app using the in-app-purchases library:
https://www.b4x.com/android/forum/threads/googleplaybilling-in-app-purchases.109945/
I am able to connect, get purchases and query SKUs, but am now stuck when trying to buy a SKU. This code
is always returning this:
BillingResult IsSuccess = False, ResponseCode = SERVICE_DISCONNECTED
Debug string: Service connection is disconnected.
This is actually returned twice, once from the LaunchBillingFlow call and again in the PurchasesUpdated event (which gets called anyway?).
I am sure the SKU is correct. Any help at all would be greatly appreciated.
Thank you in advance!
I've been developing an app using the in-app-purchases library:
https://www.b4x.com/android/forum/threads/googleplaybilling-in-app-purchases.109945/
I am able to connect, get purchases and query SKUs, but am now stuck when trying to buy a SKU. This code
B4X:
Sub buy_sku(sku As String)
Wait For (Starter.billing.ConnectIfNeeded) Billing_Connected (Result As BillingResult)
If Result.IsSuccess Then
Dim sf As Object = Starter.billing.QuerySkuDetails("inapp", Array(sku))
Wait For (sf) Billing_SkuQueryCompleted (Result As BillingResult, SkuDetails As List)
If Result.IsSuccess And SkuDetails.Size = 1 Then
Result = Starter.billing.LaunchBillingFlow(SkuDetails.Get(0))
If Result.IsSuccess Then Return
End If
End If
ToastMessageShow("Error starting billing process", True)
End Sub
is always returning this:
BillingResult IsSuccess = False, ResponseCode = SERVICE_DISCONNECTED
Debug string: Service connection is disconnected.
This is actually returned twice, once from the LaunchBillingFlow call and again in the PurchasesUpdated event (which gets called anyway?).
I am sure the SKU is correct. Any help at all would be greatly appreciated.
Thank you in advance!
Last edited: