由于setOldSku(String oldSku)已贬值,如何获取购买令牌并将其传递给setOldSk的新方法?
public void initiatePurchaseFlow(final SkuDetails skuDetails, final String oldSkuId) {
Runnable purchaseFlowRequest = new Runnable() {
@Override
public void run() {
Log.d(TAG, " SKU Details: " + skuDetails.getTitle());
BillingFlowParams purchaseParams = BillingFlowParams.newBuilder()
.setSkuDetails(skuDetails).setOldSku(oldSkuId, myPurchaseToken).build();
mBillingClient.launchBillingFlow(mActivity);
}
};
executeServiceRequest(purchaseFlowRequest);
}
最佳答案
暂时将其降级为“ com.android.billingclient:billing:2.0.1”。