Private Sub LaunchBillingFlow (Client As BillingClient, Sku As SkuDetails, OfferToken As String) As BillingResult
Dim ctxt As JavaObject
ctxt.InitializeContext
Dim ProductDetailsParamsBuilder As JavaObject
ProductDetailsParamsBuilder = ProductDetailsParamsBuilder.InitializeStatic("com.android.billingclient.api.BillingFlowParams.ProductDetailsParams").RunMethod("newBuilder", Null)
ProductDetailsParamsBuilder.RunMethod("setProductDetails", Array(Sku))
ProductDetailsParamsBuilder.RunMethod("setOfferToken", Array(OfferToken))
Dim ProductDetails As List = Array(ProductDetailsParamsBuilder.RunMethod("build", Null))
Dim BillingFlowParamsBuilder As JavaObject
BillingFlowParamsBuilder = BillingFlowParamsBuilder.InitializeStatic("com.android.billingclient.api.BillingFlowParams").RunMethod("newBuilder", Null)
BillingFlowParamsBuilder.RunMethod("setProductDetailsParamsList", Array(ProductDetails))
Return Client.As(JavaObject).GetFieldJO("client").RunMethod("launchBillingFlow", Array(ctxt, BillingFlowParamsBuilder.RunMethod("build", Null)))
End Sub