android - 根据用户 google play/amazon store 帐户恢复 IAP

标签 android unity-game-engine in-app-purchase

我的应用程序包含 IAP,我希望用户能够在新设备上安装该应用程序并恢复这些购买。我没有任何类型的登录要求,因此没有后端可以访问以检查凭据然后恢复 IAP。

我知道在 iOS 上可以简单地通过调用特定函数 ([[SKPaymentQueue defaultQueue] restoreCompletedTransactions];) 来恢复 IAP。

google play 和amazon 有类似的东西吗?如果没有,我该如何恢复 IAP?

最佳答案

From google play' official documentation : 您需要调用 queryInventoryAsync(QueryInventoryFinishedListener) 方法并处理 QueryInventoryFinishedListener 中的数据。

From Amazon's documentation : 您需要调用 PurchasingService.getPurchaseUpdates() 方法来检索用户的购买历史记录

关于android - 根据用户 google play/amazon store 帐户恢复 IAP,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27795186/

相关文章:

firebase - 统一。我真的需要添加 Firebase 分析 * 和 * crashlytic sdks 吗?

c# - 如何让敌人在靠近时转向并向玩家移动? Unity3D

image - Unity 中的莫比乌斯效应

android - 亚马逊内购 SDK : No response when testing IAPs in Live App Testing

java - 我应该如何设置 Firebase 实时数据库中键值类型的 getter 和 setter?

android - 在 Android NDK 中使用 pngquant 库(libimagequant)

android - 在 db.query() 中使用 Sqlite group_concat 而不是 rawquery

swift - 收据验证 iOS - 文件无法打开,因为没有这样的文件

ios - 自动续订订阅 : handle purchase when user is logged out

android - 服务启动几秒钟后获取 WaitingInMainSignalCatcherLoop 信号捕捉器