[英]Google Play In-App Purchases - querySkuDetailsAsync doesn't return status (active/inactive)
I'm trying to display all the possible options a user can buy, but I either don't want to list inactive ones, or want to grey/ghost them out, and maybe have coming soon on them. 我正在尝试显示用户可以购买的所有可能选项,但我不想列出不活动的选项,或者想要将它们变灰/变幻,也许很快就会出现。
However the call billingClient.querySkuDetailsAsync()
provides a list of SkuDetail
and that doesn't have the status in it. 但是,调用
billingClient.querySkuDetailsAsync()
提供了SkuDetail
的列表,但其中没有状态。
It's possible that the originalJson has it, but I haven't checked that, though the documentation doesn't appear to say that it would. 可能有originalJson,但我没有检查过,尽管文档中似乎没有说明。
EDIT: (I've just checked and originalJson doesn't have it either) 编辑:(我刚刚检查过,originalJson也没有)
Unfortunately, this isn't available in the SkuDetails response payload from the query (as you also confirmed in the original Json). 不幸的是,这在查询的SkuDetails响应有效负载中不可用(您在原始Json中也已确认)。
Looking into the Issue Tracker for the Play Billing Library, someone else has brought this up to the team :: Add getState (state = active / inactive) to SkuDetails , in which its still active so it may be available in the future. 在研究Play Billing Library的问题跟踪器后,其他人将其带到了团队:: 将getState(state = active / inactive)添加到SkuDetails中,该状态仍处于活动状态,因此将来可能会可用。
For now, you'll have to track which ones are inactive in the app and filter the response when its received. 目前,您必须跟踪应用中哪些无效,并在收到响应后过滤响应。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.