Google Play帐单V5-获取产品的价格
在V4中,我曾经有Skudetailss.price来获取产品的价格,但现在在V5的新产品Details中不再可用。
如何在此新版本中获得产品的价格?
In v4, I used to have SkuDetails.price to get the price of the product but now it's not available anymore in the new ProductDetails in v5.
How can I get the price of a product in this new version?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
当您调用
getsubscriptionofferdetails
时,它将返回可为订阅产品购买的优惠。然后,您可以调用getPricingphases()
获取定价阶段的列表。每个定价阶段对象都有一个getformattedPrice()
调用以获取要约价格的价格( https://developer.android.com/reference/com/android/android/billingclient/api/productdetails.pricingphases.pricingphases.pricingphase )When you call
getSubscriptionOfferDetails
, it returns the offers available to buy for the subscription product. Then you can callgetPricingPhases()
to get the list of the pricing phases. Each pricing phase object has agetFormattedPrice()
call to get the price of an offer's pricing phrase (https://developer.android.com/reference/com/android/billingclient/api/ProductDetails.PricingPhase)您必须检查可用产品
,然后
You have to check for Available Products
And then
我使用以下代码获取价格详细信息。
私有void queryproduct(){
i use the following code to get price details.
private void queryProduct() {