Android Question SOLVED Billing Subscriptions

gregorio_adrian_gimenez

Active Member
Licensed User
Longtime User
Hi, did anyone get a subscription purchase to work?
Create a product id in google console, all perfect, but for some reason the product list returns it to 0.
billing.SubscriptionsSupported return true

Result,IsSucess = true
QuerySkuDetails return list = 0 🙆‍♂️

Any clue that I may be doing wrong?


B4X:
Sub Button_billing_Click
   

    Wait For (Starter.billing.ConnectIfNeeded) Billing_Connected (result As BillingResult)
    If result.IsSuccess Then
       
        Dim sf As Object = Starter.billing.QuerySkuDetails("subs", Array(Starter.ADS_SDK_ID))
        Wait For (sf) Billing_SkuQueryCompleted (result As BillingResult, SkuDetails As List)
        If result.IsSuccess And SkuDetails.Size = 1 Then
            'start the billing process. The PurchasesUpdated event will be raised in the starter service
            result = Starter.Billing.LaunchBillingFlow(SkuDetails.Get(0))
            Log("LaunchBillingFlow: " & result.IsSuccess)
            End If
           
    Else
        ToastMessageShow("Error starting billing process", True)
    End If
End Sub
thank you very much to all!
 
Last edited:

gregorio_adrian_gimenez

Active Member
Licensed User
Longtime User
HI,
Public const ADS_SDK_ID As String = "youspeak.semanal.01"

In console development

1606135013346.png


Also verify that the subscription is active.


I tried like that

B4X:
Sub Button_billing_Click
   
Log(" soporta suscripciones? : "& Starter.billing.SubscriptionsSupported)

    Wait For (Starter.billing.ConnectIfNeeded) Billing_Connected (result As BillingResult)
    If result.IsSuccess Then
        'get the sku details
        Dim sf As Object = Starter.billing.QuerySkuDetails("subs", Array("youspeak.semanal.01"))
        Wait For (sf) Billing_SkuQueryCompleted (result As BillingResult, SkuDetails As List)
        If result.IsSuccess And SkuDetails.Size = 1 Then
            'start the billing process. The PurchasesUpdated event will be raised in the starter service
            result = Starter.Billing.LaunchBillingFlow(SkuDetails.Get(0))
            Log("LaunchBillingFlow: " & result.IsSuccess)
            End If
           
    Else
        ToastMessageShow("Error starting billing process", True)
    End If
   
   
End Sub


the login is by phone number to firebase

can there be another cause?
regards
 
Last edited:
Upvote 0
Top