IABHelper getSubscriptionPeriod

时间:2018-11-09 09:35:40

标签: android-billing

https://developer.android.com/reference/com/android/billingclient/api/SkuDetails中,我可以找到getSubscriptionPeriod函数。

但是在IABHelper中,我找不到itu。

我可以像下面的代码一样添加getSubscriptionPeriod吗?或任何其他解决方案?

public SkuDetails(String itemType, String jsonSkuDetails) throws JSONException {
        mItemType = itemType;
        mJson = jsonSkuDetails;
        JSONObject o = new JSONObject(mJson);
        mSku = o.optString("productId");
        mType = o.optString("type");
        mPrice = o.optString("price");
        mPriceAmountMicros = o.optLong("price_amount_micros");
        mPriceCurrencyCode = o.optString("price_currency_code");
        mTitle = o.optString("title");
        mDescription = o.optString("description");
        mSubscriptionPeriod = o.optString("subscriptionPeriod");
    }

public String getSubscriptionPeriod () { return mSubscriptionPeriod ; }

0 个答案:

没有答案