使用共享的 Android Bundle ID 来同时发布到多个 Android IAP 商店(例如 Samsung 和 Google)时,会出现跨店安装问题。本页面介绍这些冲突的结果以及如何解决该问题。
跨店安装情况是指用户从一个商店(商店 A)安装应用程序,然后使用另一商店(商店 B)的应用程序来进行升级安装的情况。用户升级安装的机会属于托管最新应用程序版本的商店。应用程序的两个版本使用相同的 Android Bundle ID 和签名密钥时,可能会出现这种情况。
例如,com.foo.bar
已发布到 Google Play 和 Amazon Appstore。一名已安装这两个应用商店的用户可能从 Amazon Appstore 安装 com.foo.bar
,而从 Google Play 接收更新的版本。这可能会导致其丢失 IAP 数字商品交易,并且无法恢复先前进行的交易。
跨店冲突可能导致使用 IAP 的应用程序出现难以解决的终端用户问题。用户可能发现在卸载/重新安装后会丢失购买的商品,还可能丢失因跨店升级而中断的购买。
导致的 IAP 问题是:
丢失未完成的购买。在购买获得批准之后,但在应用程序确认从商店的计费系统接收购买之前,如果用户进行升级,就会发生这种情况。如果应用程序未能及时与云端库存服务同步,或者在将这个新的 IAP 保存到本地库存数据库之前该应用程序崩溃,则会出现这种情况。
扣留从商店 A 进行的购买。如果用户在商店 A 完成 IAP 交易后从商店 B 重新安装应用程序,就会发生这种情况。他们将无法恢复这些交易。许多商店明确禁止应用程序访问其他商店的 IAP 系统。为了变通解决此问题,请使用云端库存系统及其相关的用户身份服务。
有差异的 IAP 商品列表。如果商店 B 的应用程序中的升级后商品列表与商店 A 的版本中的该列表不同,就会发生这种情况。您可以提供有差异的 IAP Catalog。商店 B 版本读取不一致的本地库存时,这可能会导致应用程序错误,或者如果以前购买的库存在商店 B 的版本中不可用,用户可能会失去该库存。
有两种方法来解决跨店冲突:
Did you find this page useful? Please give it a rating:
Thanks for rating this page!
What kind of problem would you like to report?
Thanks for letting us know! This page has been marked for review based on your feedback.
If you have time, you can provide more information to help us fix the problem faster.
Provide more information
You've told us this page needs code samples. If you'd like to help us further, you could provide a code sample, or tell us about what kind of code sample you'd like to see:
You've told us there are code samples on this page which don't work. If you know how to fix it, or have something better we could use instead, please let us know:
You've told us there is information missing from this page. Please tell us more about what's missing:
You've told us there is incorrect information on this page. If you know what we should change to make it correct, please tell us:
You've told us this page has unclear or confusing information. Please tell us more about what you found unclear or confusing, or let us know how we could make it clearer:
You've told us there is a spelling or grammar error on this page. Please tell us what's wrong:
You've told us this page has a problem. Please tell us more about what's wrong:
Thank you for helping to make the Unity documentation better!
Your feedback has been submitted as a ticket for our documentation team to review.
We are not able to reply to every ticket submitted.