在应用程序中显示不同国家的订阅价格

问题描述 投票:0回答:1

我有一个具有订阅价格的应用程序,对于所有国家/地区都是相同的,并且对于几个国家/地区来说可能会很高,所以我想相应地设置价格

价格可以在Google Play Console的基本计划中设置,这没有问题,但应用程序必须显示每个国家/地区的价格以符合政策,但我不知道该怎么做。

也许可以用带有国家代码和价格的 json 来完成,但它似乎一团糟。 有人有这方面的好经验并想分享吗?

提前致谢。

我不知道从哪里开始。

android subscription billing
1个回答
0
投票

Google Play 结算库让您查询应用内项目

  val queryProductDetailsParams =
    QueryProductDetailsParams.newBuilder()
        .setProductList(
            ImmutableList.of(
                Product.newBuilder()
                    .setProductId("product_id_example")
                    .setProductType(ProductType.SUBS)
                    .build()))
        .build()

  billingClient.queryProductDetailsAsync(queryProductDetailsParams) {
    billingResult,
    productDetailsList ->
      // check billingResult
      // process returned productDetailsList
  }
)
© www.soinside.com 2019 - 2024. All rights reserved.