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