Android:设置应用内计费以打开新的活动类别
我已经阅读了应用程序内计费设置,但我仍然不明白。
任何人都可以提供打开活动的应用程序内计费示例吗?
例子: 我有一个有五个按钮的游戏,所有按钮都会打开一个新的 java 类活动。 但在其中一个按钮中,我想添加应用内计费,用户在查看活动之前只需先购买一次。
谢谢沃利
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
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可能想查看像 Swarm 这样的抽象层,它通过一些方便的包装提供应用内购买。您可以执行以下操作(伪代码):
userInventory.containsItem(itemId)
和
storeItem.purchase()
这应该会让大多数应用内购买变得非常简单。
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.