Byr*_*ron 18 android in-app-billing
我正在使用Google提供的IABHelper在In App Billing Version 3中遇到间歇性问题.
在启动新购买之前,我使用queryInventoryAsync检查未使用的购买.如果发现我消耗任何未消耗的购买并开始新的交易,如果不是直接开始新的交易.99%的时间它工作正常.
有时,当queryInventoryAsync未返回未使用的购买时,以下launchPurchaseFlow将失败并显示响应:7:项已经拥有.
INFO [IABHelper] Starting async operation: refresh inventory
INFO [IABHelper] Querying owned items, item type: inapp
INFO [IABHelper] Package name: jp.co.mycompany.myapp
INFO [IABHelper] Calling getPurchases with continuation token: null
INFO [IABHelper] Owned items response: 0
INFO [IABHelper] Continuation token: null
INFO [IABHelper] Querying SKU details.
INFO [IABHelper] queryPrices: nothing to do because there are no SKUs.
INFO [IABHelper] Querying owned items, item type: subs
INFO [IABHelper] Package name: jp.co.mycompany.myapp
INFO [IABHelper] Calling getPurchases with continuation token: null
INFO [IABHelper] Owned items response: 0
INFO [IABHelper] Continuation token: null
INFO [IABHelper] Querying SKU details.
INFO [IABHelper] queryPrices: nothing to do because there are no SKUs.
INFO [IABHelper] Ending async operation: refresh inventory
INFO [IABHelper] Constructing buy intent for jp.co.mycompany.myapp.myitem, item type: inapp
INFO [IABHelper] Launching buy intent for jp.co.mycompany.myapp.myitem Request code: 1001
INFO [IABHelper] Ending async operation: launchPurchaseFlow
INFO [IABHelper] Purchase canceled - Response: 7:Item Already Owned
Run Code Online (Sandbox Code Playgroud)
queryInventoryAsync表示用户不拥有该项,但launchPurchaseFlow表示该用户具有该项.
在等待(有时是几分钟,有时甚至更多)后奇怪地解决了问题.
有没有人经历过类似的事?
作为参考,我使用的是3月15日最新更新的IABHelper版本.
| 归档时间: |
|
| 查看次数: |
3436 次 |
| 最近记录: |