简体   繁体   English

Google Play应用内购买-querySkuDetailsAsync不返回状态(有效/无效)

[英]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.

相关问题 Google Play应用内订阅项 - 在开发者控制台中切换活动和非活动状态 - Google Play In-App Subscription Items - Toggle Active and Inactive in Developer Console Corona SDK:应用内购买不会在Android上返回状态 - Corona SDK: In-app purchases do not return status on Android 在Google Play应用内结算中消费已取消购买 - Consuming cancelled purchases on Google Play In-app Billing 应用内购买如何使用Google Play进行墨绿色包装 - How to do In-App Purchases ink ivy using Google Play 如何在Google Play上为我的应用关闭“提供应用内购买”功能 - How to turn off “Offers in-app purchases” on Google Play for my app Google Play控制台:您的应用尚没有任何应用内商品 - Google Play Console: Your app doesn't have any in-app products yet 谷歌游戏控制台。 您的应用还没有任何应用内商品 - Google Play Console. Your app doesn't have any in-app products yet 使用 Google Checkout 验证 Android 应用内购买? - Verify Android in-app purchases with Google Checkout? 应使用哪些用户身份来整理Google Play中的应用内购买? - What user identity should be used to collate in-app purchases from Google Play? 使用Google Play应用内结算进行一次性购买的计时赛 - Time trial for one-time purchases with Google Play In-App Billing
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM