Reputation: 1904
If I want to sell something via "In-app Billing" in android, But I want that the user could select the amount to purchase.
Do I have to predefine all the amounts? Or can I somehow (how?) send the "In-app Billing" the amount of an item?
Upvotes: 0
Views: 1464
Reputation: 3431
I just did something similar in Audio Control Lite. I allow users to select which feature they want to unlock (6 to choose from). From my experiences I know you have to pre-define the amounts, however you can setup 20+ different items to sell if you want to an direct the users to the 5 you want to display. I ended up creating a purchase screen with a description and purchase button for each feature. You'll end up passing the predefined SKU to tell Google which item they are purchasing.
Upvotes: 1
Reputation: 38
As I've read, you can't actually buy multiple items at the same time, as they state here, nor you can ask for multiple copies of your product, unless last purchase was consumed previously.
http://developer.android.com/google/play/billing/billing_overview.html
Although, what you can do is, iterate your purchase request (OK, this isn't an elegant way to do it) or define specific quantity packs (let's say, if you want to sell extra lives, you could sell it by 1, 5 or 10).
Hope this helps.
Upvotes: 1