android - Google IAB V3 多设备缓存

标签 android google-play-services in-app-billing google-play android-billing

我一直在使用 google iab v3 api 实现应用内购买解决方案,在一台设备上购买商品时效果很好,但我偶然发现了一个问题。

如果用户在多个设备上使用同一个帐户登录并使用我的应用程序,我希望函数 billingService.getPurchases(...) 返回相同的购买列表。 情况并非如此,如果我在两台设备上进行不同的购买,购买列表会(随机)在每台设备上更新。

我最好的猜测是,这与 google play billingService 进行内部缓存有关吗?但是,如果我尝试购买一件已经在另一台设备上购买过的商品,我会收到错误消息:“您已经拥有该商品”,但列表/缓存仍未更新。

有没有人有类似的经历? 您知道是否可以强制计费服务针对谷歌服务器进行更新吗? 计费服务何时更新缓存是否有任何已知的时间表?

谢谢 伯恩特-约翰

最佳答案

简单的解决方案是启动 Google Play 商店应用,然后更新内部缓存。

关于android - Google IAB V3 多设备缓存,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23469220/

相关文章:

android - 无法在芯片中添加图标

java - 连接暂停后的 GoogleApiClient 重新连接策略是什么?

android - 在应用程序内购买

android - 如何纠正自动生成的 IMarketBillingService.java 文件中的错误?

java - 验证/验证 Google Play 游戏服务 ID?

android - 如何在应用内计费应用程序android中调用getpurchase方法?

android - 这个 android 菜单 View 的名称是什么?

Android Webview 使用物理单位 (cm/in)

android - Android 上的 Pygame

android - 将 Google Play 服务版本添加到您的应用 list ?