Android Question In App Billing V3 question.

jamesgrigg01

Member
Licensed User
Longtime User
Using the sub:

Code: Copy
Sub manager_PurchaseCompleted (Success As Boolean, Product As Purchase)

How am i able to program it so that if a product is purchased, a boolean is changed.

Thanks, James.
 
I recommend you to handle the OwnedProducts event. This will allow you to check the owned products when the program starts.

In the PurchaseCompleted event (and when your program starts) you can call manager.GetOwnedProducts. This will raise the OwnedProducts event:

Code: Copy
Sub manager_OwnedProducts (Success As Boolean, Purchases As Map)
 If Success And Purchases.ContainsKey("YourProduct") Then
   'Do what ever you need to do
 End If
End Sub
 
Upvote 0
I recommend you to handle the OwnedProducts event. This will allow you to check the owned products when the program starts.

In the PurchaseCompleted event (and when your program starts) you can call manager.GetOwnedProducts. This will raise the OwnedProducts event:

Code: Copy
Sub manager_OwnedProducts (Success As Boolean, Purchases As Map)
If Success And Purchases.ContainsKey("YourProduct") Then
   'Do what ever you need to do
End If
End Sub
Since i only have one product can i just use success instead without including "And purchases.containskey("")"?

Thanks, James.
 
Upvote 0
Back
Top