Android Question BillingManager3 basic questions

drj

Member
Licensed User
Longtime User
I am in the process of implementing an in-app purchase and have been studying the questions and tutorial quite a bit. There are a few items that are not clear at this time.

1. Routine manager_OwnedProducts(success as Boolean , purchases as map)

I assume that this routine returns Boolean success telling me that it found that I had or had not found that the current users owns an in-app purchase. For example, it there has been only one in-app purchase defined for this app in Google Play then I can assume that the user has purchased it if success is true.

Can you tell me what p.Productid is? is this a string returned from the Billing Manager giving me that name of the in-app purchase?

I assume that p.Purchased = p.STATE_PURCHASED means that the user has purchased this product although I can find no reference to p.STATE_PURCHASED in any documentation.

2. I have implemented the purchasing of the in-app purchase in another activity - I assume it is ok to reference the Main activity in calling the BillManager routines - so my call looks like this

Main.manager.RequestPayment(Main.Productid, Main.Producttype, Main.DeveloperPayload)

I have defined Productid , Productstype and DeveloperPayload as strings in Process Globals in my main routine.

Is this correct? and this leads to my third question

3. Calling Main.manager.RequestPayment(Main.Productid,Main.Producttype, Main.DeveoperPayload)

are the variables Productid , Producttype and DeveloperPayload returned from the BillingManager or do I have to supply them?

What are the definitions of these variables and how do I use them.

How can I tell that the in-app has been successfully purchased by the user? is there anything returned from this call to indicate a successful purchase

or do I have to call manager_OwnProducts again after I have made to call manager.RequestPayment


The interface seems very simple , the problem is that there is no documentation or working example to see.

Can you help me?

Thanks

Jerry
 
Top