Billing: add PRODUCT_DETAILS feature support check

This commit is contained in:
Tretzi
2026-04-15 18:52:35 -05:00
parent 703cbcfb5b
commit 2ec47df39d

View File

@@ -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)