【发布时间】:2021-10-30 05:45:11
【问题描述】:
我正在尝试使用 BillingClient 检测宽限期。
文档说:
订阅在其整个生命周期中会经历各种状态变化,您的应用需要响应每一次变化。要检查订阅者的状态,您的应用可以使用 Google Play 结算库中的 BillingClient.queryPurchasesAsync() 或 Google Play Developer API 中的 Purchases.subscriptions:get 进行查询。
不幸的是,在我看来,使用 BillingClient 无法区分有效订阅和宽限期。在这两种情况下,isAutoRenewing 标志都设置为true,而purchaseState 是1。至少当我尝试在测试环境中通过使用Test card, always approves 购买订阅,然后在续订之前更改为Test card, always declines 来重现这种情况时,我看到的就是这种情况。
有什么想法吗?
【问题讨论】:
标签: android google-play in-app-subscription google-play-billing