Billing: add PRODUCT_DETAILS feature support check
This commit is contained in:
@@ -132,6 +132,13 @@ class BillingManager(
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Check if product details feature is supported
|
||||||
|
val featureResult = billingClient.isFeatureSupported(BillingClient.FeatureType.PRODUCT_DETAILS)
|
||||||
|
if (featureResult.responseCode != BillingClient.BillingResponseCode.OK) {
|
||||||
|
logError("PRODUCT_DETAILS feature not supported: ${featureResult.responseCode}")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
val products = listOf(
|
val products = listOf(
|
||||||
QueryProductDetailsParams.Product.newBuilder()
|
QueryProductDetailsParams.Product.newBuilder()
|
||||||
.setProductId(BillingProducts.SUB_REMOVE_ADS_MONTHLY)
|
.setProductId(BillingProducts.SUB_REMOVE_ADS_MONTHLY)
|
||||||
|
|||||||
Reference in New Issue
Block a user