Android Question Google play billing v6

aeric

Expert
Licensed User
Longtime User
It looks like the simple "android.test.purchased" test id no longer works.

The Result.IsSuccess is True but SkuDetails.Size = 0
B4X:
Sub btnRemoveAds_Click
    'make sure that the store service is connected
    Wait For (billing.ConnectIfNeeded) Billing_Connected (Result As BillingResult)
    If Result.IsSuccess Then
        'get the sku details
        Dim sf As Object = billing.QuerySkuDetails("inapp", Array(ADS_SDK_ID))
        Wait For (sf) Billing_SkuQueryCompleted (Result As BillingResult, SkuDetails As List)
        'If Result.IsSuccess And SkuDetails.Size = 1 Then
        '    Result = billing.LaunchBillingFlow(SkuDetails.Get(0))
        '    If Result.IsSuccess Then Return
        'End If
        If Result.IsSuccess Then
            If SkuDetails.Size > 0 Then
                Result = billing.LaunchBillingFlow(SkuDetails.Get(0))
                If Result.IsSuccess Then Return
            Else
                ToastMessageShow("Error SKU not found", True)
                Return
            End If
        End If
    End If
    ToastMessageShow("Error starting billing process", True)
End Sub
 
Upvote 0

aeric

Expert
Licensed User
Longtime User
I am getting error for subscription.


Edit: solved
 
Last edited:
Upvote 0

asales

Expert
Licensed User
Longtime User
Thanks, @Erel!
It's seems to worked fine here.
I made a purchase in a test device and no problem.
I'll put in production soon.
 
Upvote 0

asales

Expert
Licensed User
Longtime User
Please try the attached library. It is based on billing v7.0.0.
It looks like the simple "android.test.purchased" test id no longer works.
Can you share the source code of this lib?

I checked this link, but it has the old libs:
 
Upvote 0
Top