Android Question In-App consumable purchases

MarcoRome

Expert
Licensed User
Longtime User
Hi all.
Is this right code to make purchases on consumption ??

B4X:
Sub Activity_Create(FirstTime As Boolean)
        .....
    If FirstTime Then
        manager.Initialize("manager", key)
    End If
   
    If manager.SubscriptionsSupported = True Then manager.GetOwnedProducts
    manager.DebugLogging = True

End Sub

#Region licenza
'**********************************************************
'Qui controllo se la licenza a consumo è  acquistata
Sub Manager_BillingSupported (Supported As Boolean, Message As String)
    Log(Supported & ", " & Message)
    Log("Subscriptions supported: " & manager.SubscriptionsSupported)
    If Supported Then
        manager.GetOwnedProducts
    End If
End Sub

Sub Manager_PurchaseCompleted(Success As Boolean, Product As Purchase)
If Success Then
    Dim inseriscisecondi As String
    If Product.ProductId = "buy180" Then
            .......
           
    Else If Product.ProductId = "buy600" Then
            ........
   
    Else If Product.ProductId = "buy1800" Then
            .......
   
    End If

End If
End Sub


Sub btn_acquista600_Click
    manager.RequestPayment("buy600", Producttype, DeveloperPayload)
End Sub
Sub btn_acquista1800_Click
    manager.RequestPayment("buy1800", Producttype, DeveloperPayload)
End Sub

Sub btn_acquista180_Click
    manager.RequestPayment("buy180", Producttype, DeveloperPayload)
End Sub

and again in Play Store when i open "Product In-App"" i see this:
image-inapp-BD39_5461110A.jpg


Here i read:
"The managed items can be purchased only once with a user account on Google Play. Google Play permanently stores transaction information related to each item on a per user...".
If so what I have to choose ??

I am a little confused... :confused:

Thank you all.
Marco
 
Top