android - Google Play 结算订阅 : new policy for mandatory "Hold": what needs to be changed in the app UI?

标签 android in-app-billing in-app-subscription

Google 将于 2020 年 11 月 1 日更改其政策:需要启用订阅“保留”https://android-developers.googleblog.com/2020/06/new-features-to-acquire-and-retain-subscribers.html
目前,这是我如何查询用户是否购买了我的订阅(我的应用中只有 1 个订阅)并相应地授予他权限:

private void queryPurchase() {
    Purchase.PurchasesResult purchasesResult = mBillingClient.queryPurchases(BillingClient.SkuType.SUBS);
    if (purchasesResult != null) {
        if (purchasesResult.getPurchasesList() != null) {
            if (purchasesResult.getPurchasesList().size() > 0) {
                String purchaseToken = purchasesResult.getPurchasesList().get(0).getPurchaseToken();

                if (purchasesResult.getPurchasesList().get(0).toString().contains("productId\":\"" + "myID")) {
                    //grant user subscription's privileges
                }
            }
            else {
                //do not grant user subscription's privilege
            }
        }
    }
}
我的问题是:
  • 此方法是否仍能正确检测订阅是否处于暂停状态?
  • 我是否需要添加与保留状态特别相关的 UI/消息?
  • 最佳答案

    自 11 月 1 日以来,我的几个应用程序仅在服务器端进行了更改,与用户界面/消息传递无关。而且由于我没有收到任何拒绝或警告,我会得出结论,不需要更改 UI/消息。
    如果 Google 的要求更明确以避免浪费时间,那就太好了!

    关于android - Google Play 结算订阅 : new policy for mandatory "Hold": what needs to be changed in the app UI?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/63879254/

    相关文章:

    android - 每个支持 GCM 的应用程序都应该有 "android.permission.WAKE_LOCK"

    android - 通用网络安全字体

    android应用内计费安全验证方法总是返回false

    Android In App Billing 仅在 Samsung tab 10.1 中崩溃

    android - 为什么 URL.openStream() 方法会产生 IOException?

    java - 删除或更新包时不会调用 BroadcastReceiver

    ios - 应用内购买收据中的 "expires_date"设置为早于 iOS 中的 "purchase_date"的日期

    android - 在 Google Play 商店中订阅应用程序时启用免费试用优惠

    Android 购买订阅和入门价