isEligibleForFreeTrial

open fun isEligibleForFreeTrial(productId: String): Boolean

Whether this user can currently start a free trial on this product.

Google Play filters the offer list per account: an account that has already used the trial for a subscription simply does not receive that offer in ProductDetails. So the presence of a trial offer is the eligibility signal, and this method is the honestly-named way to ask.

Use it to choose paywall copy — "Start 7-day free trial" versus "Subscribe" — instead of showing a trial the user cannot claim and having Play charge them immediately.

Only meaningful once product details have loaded; see isProductDetailsLoaded.

Return

true when a free-trial offer is available to this account.

Since

4.4.0

Parameters

productId

Subscription product id.