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