Android Tutorial Android In-App Billing v3 Tutorial

pezhooman

Member
Licensed User
Longtime User
hi Erel.
Im new.would you send a simple example project with In-app billingv3.?
thanx
 

bluedude

Well-Known Member
Licensed User
Longtime User
Erel,

I'm not sure you explain the "consume" correctly. You say if the user used it this will make it available again. However, below documentation from Google tells me a different story.

"In Version 3, all in-app products are managed. This means that the user's ownership of all in-app item purchases is maintained by Google Play, and your application can query the user's purchase information when needed. When the user successfully purchases an in-app product, that purchase is recorded in Google Play. Once an in-app product is purchased, it is considered to be "owned". In-app products in the "owned" state cannot be purchased from Google Play. You must send a consumption request for the "owned" in-app product before Google Play makes it available for purchase again. Consuming the in-app product reverts it to the "unowned" state, and discards the previous purchase data."

It states that this method sets the product to "unowned" state, and discards the previous purchase data. That means in the end it will not show up again in the owned products list.

Can you explain a little more because you say "consume" means the user used it.
 

Eumel

Active Member
Licensed User
Longtime User
consume something for example in a game.

A User can Buy extra life. InGame if he lost this extra life, he has consumed it.
Now you must send a consuming request to google playstore, and the user can buy the extra life again.
 

sktanmoy

Active Member
Licensed User
Longtime User
In this tutorial, I couldn't find
1. How I allow user to purchase a product
2. Show a message after purchasing
Please help me.
 

LeeM

Member
Licensed User
Longtime User
I've been playing with in-app billing and have successfully purchased items, consumed them (later) and then been able to re-purchase the same items. This was all done with an active internet connection.

Obviously purchasing can only be done with an active internet connection but how can I consume items if I'm offline ?
When I purchase my items should I save information about the items locally and then if I'm offline and I consume any items later should I log this locally too. Then when I go online I can update the console ?
 

Vince

Member
Licensed User
Longtime User
May i know the service will support Malaysia or Singapore? because google merchant didn't support this two country, whether in-app billing can support all? thanks
 

deltacode

Member
Licensed User
Longtime User
Hi all,

I think i am missing something. How can i, on demand, populate a spinner with the list of options to be purchased from my in-app purchase list on the store ?

I know i could manually populate this but that would be duplicating work when they are already setup on the store.

Is this possible ?
 

Marcos Alves

Well-Known Member
Licensed User
Longtime User
Hi @Erel !

I have a question here: manager is a global object but inside an Activity (Main). If I need to use this object in another activity, the call will be Main.manager.whatever ... but the events will be raised in the current activity or in Main ? (remember that Main activity is paused in this moment). What is the flow? Events Subs will be called imediatly? The Main activity will open and pause the current? Or we need to declare events inside the current activity also and these ones (not others in Main) will be triggered???
 

Marcos Alves

Well-Known Member
Licensed User
Longtime User


Ok, I tested - the event returns inside the activity which called main.manager ... thanks!
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…