I’ve successfully managed to implement the IOS-store and it’s functionalities which have consumable and non-consumable products which works really well.
I know noticed that Google Play had a similar system but has now made all their products non-consumable, if you want is as an consumable you now have to send a message to Google Play to “unlock” the product so that the user will be able to purchase the product once more.
Is this supported in Defold or has anyone solved this problem before?
Hi Rasmus!
I’m happy it works for iOS! Though I’m not entirely sure what you are after so I ask for a little clarification: Consumables are what should work with defold today (it’s the best type of product, you can sell it again and again!). Products purchased are automatically consumed with google by defold and can be purchased again, so you need to track the owned amount yourself in the client if this is something you want to keep/add to? Do you perceive it works differently, or do you want it to work differently?
If you can, it would be nice if you could share what the use case is about (without revealing too much).
Thanks /L
The problem is the new system setup by google play.
You can no longer make a consumable product (they have removed this option completely) and are forcing you to “unlock” a non-consumable for it to work as a consumable. If I understand it correctly:
“
You can use the In-app Billing Version 3 API to track the ownership of purchased in-app products in Google Play. Once an in-app product is purchased, it is considered to be “owned” and cannot be purchased from Google Play. You must send a consumption request for the in-app product before Google Play makes it available for purchase again.
” - google play documentation
What I understand I have to send a"consumption request", which isn’t supported in defold?
//Rasmus
Hi Rasmus,
I recommend you try running your use case and let me know if it doesn’t already work the way you want it to.
The product is automatically consumed by defold so my perception is that it works the way you want it to already. There is no need to call consume manually from your code since it’s done by the defold engine. This of course makes storing non-consumables with google difficult/impossible. But form what I understand this is not what you’re trying to do. /L
You were correct. The product can be bought multiple times, so consumables does work as intended. At least when in sandbox mode.
Which means that non-consumables function as consumables as well. I fixed this problem with inactivating the button for the product inside my app. So that a user doesn’t buy the same Mappack twice.
Althought if the user were to reinstall or install on another mobile the user has to buy these items again I guess.
Thanks for your help with the matter!
//Rasmus