Android: Setting up In-app billing for opening a new activity class
-
12-11-2019 - |
Question
I have read the in-app billing setup but still I don't understand a thing..
Can anyone or does anyone have a sample in-app billing of opening an activity?
Example: I have a game that has five buttons and all of the buttons open a new java class activity. But in one of the buttons I want to add in-app billing that a user has to purchase only once first before viewing the activity.
Thanks
Wally
Solution
You might want to check out an abstraction layer like Swarm, which provides in-app purchases with some convenience wrappers. You can do things like (pseudocode):
userInventory.containsItem(itemId)
and
storeItem.purchase()
Which should make the majority of in-app purchase stuff pretty simple.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow