在应用程序购买中显示消息“您已经拥有此项目".在Android中 [英] In app purchase displays message "you already own this item." in android

查看:90
本文介绍了在应用程序购买中显示消息“您已经拥有此项目".在Android中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试实施应用内广告.在android中,应用内运行正常.但是,当我从设备中删除该应用并重新安装该应用时,如果我尝试购买后,它会显示此消息(产品为托管和应用内API版本2)

I am trying to implement in-app. In android, in-app is working perfectly.But, when I remove the app from device and reinstall it, then after if I try to purchase, it displays this message (product is Managed and in-app API Version 2)

在日志中,我遇到错误 RESULT_DEVELOPER_ERROR ,然后我用Google搜索,发现版本3具有更多的响应代码,例如 BILLING_RESPONSE_RESULT_ITEM_ALREADY_OWNED

and in log, I have an error RESULT_DEVELOPER_ERROR , then I googled and I found the Version 3 has more number of response codes like BILLING_RESPONSE_RESULT_ITEM_ALREADY_OWNED

因此,如果已经购买了产品,则响应必须类似于 BILLING_RESPONSE_RESULT_ITEM_ALREADY_OWNED ,并且在版本2中是不可能的.

So if product is already purchased, the response must be like BILLING_RESPONSE_RESULT_ITEM_ALREADY_OWNED and this is not possible in Version 2.

那我该怎么办?我需要实现版本3吗?

Then what should I do ? Do I need to implement Version 3 ?

推荐答案

如果您想在每次之前强制购买产品,则该产品应不受管理.

if you want force to buy product by every time then product should be Unmanaged.

产品可以分为3种类型

1)托管

2)不受管理

3)订阅

托管表示Google自行保存记录.因此,通过使用相同的电子邮件ID,用户无需支付费用,例如删除广告

Managed means google it self keep record. so by using same email id user not have to paid its charge e.g. remove ads

不受管理意味着用户每次必须购买,并且需要付费.例如木薯片

Unmanaged means user have to buy every time and will be a charged. e.g. Pocker chips

我已经在开发者网站上阅读了这2个示例.

This 2 example i have read on developer site..

并参考 http://developer.android.com/google/play/billing/billing_admin.html

这篇关于在应用程序购买中显示消息“您已经拥有此项目".在Android中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆