在“托管”应用程序上卸载后,应用程序内购买会丢失。购买类型 [英] In-app purchases are lost after uninstall on "managed" purchase type
问题描述
我已经阅读了其他主题,他们表示只要在设置应用内结算时选择了托管购买类型,就会存储应用内购买。托管意味着,当应用程序重新安装时,它可以询问应用程序内账单服务该特定用户已经购买了哪些项目。我已经在所有应用中使用应用内结算设置了托管购买类型。当应用程序被卸载并重新安装时,购买仍然会丢失。我使用测试帐户作为alpha测试器进行测试。顾客说同样的事情。
为什么会发生这种情况?我真的需要使用backupAgentHelper来解决这个问题吗?当我选择托管购买类型时,Google是否应该解决这个问题?解决方案
您是对的,您可以查询只要您还没有消费该物品,应用内结算服务就可以获取用户购买的物品。只要您消费了购买,您就无法再查询应用内结算服务以获取该项目。你打电话看起来像这样?
iabGooglePlayHelper.mService.consumePurchase(3,getPackageName(),purchaseToken);
如果是这样,那么您正在消耗它。如果情况并非如此,那么这可能与您如何查询应用内结算服务有关。如果您认为这是问题,您可以提出该代码吗?
I have read other threads here and they say that In-app purchases are stored as long as "managed" purchase type is chosen when in-app billing is set up. Managed means that when the app is reinstalled, it can ask the in-app billing service which items this particular user has already purchased. I have set up "managed" purchase type in all my apps with In-app billing. The purchases are still lost when the apps are uninstalled and then installed again. I tested with a test account as a alpha tester. The customers say the same thing.
Why does this happen? Do I really need to use a backupAgentHelper to solve this? Shouldn't this be solved by Google when I choose "managed" purchase type?
You're right, you can query the in-app billing service to get the items a user has purchases, as long as you haven't 'consumed' the item. As soon as you consume the purchase, you can no longer query the in-app billing service to get that item. Are you making a call that looks something like this?
iabGooglePlayHelper.mService.consumePurchase(3, getPackageName(), purchaseToken);
If so, then you're consuming it. If that is not the case, then it may be with how you're querying the in-app billing service. Can you pose that code if you believe it to be the problem?
这篇关于在“托管”应用程序上卸载后,应用程序内购买会丢失。购买类型的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!