简体   繁体   中英

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.

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.

EDIT: (I've just checked and originalJson doesn't have it either)

Unfortunately, this isn't available in the SkuDetails response payload from the query (as you also confirmed in the original 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.

For now, you'll have to track which ones are inactive in the app and filter the response when its received.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM