isFeatureEnabled

abstract fun isFeatureEnabled(distinctId: String, key: String, defaultValue: Boolean = false, groups: Map<String, String>? = null, personProperties: Map<String, Any?>? = null, groupProperties: Map<String, Map<String, Any?>>? = null): Boolean

Returns if a feature flag is enabled, the feature flag must be a Boolean Docs https://posthog.com/docs/feature-flags and https://posthog.com/docs/experiments

Parameters

distinctId

the distinctId

key

the Key

defaultValue

the default value if not found, false if not given


open fun isFeatureEnabled(distinctId: String, key: String): Boolean

Returns if a feature flag is enabled, the feature flag must be a Boolean Docs https://posthog.com/docs/feature-flags and https://posthog.com/docs/experiments

Parameters

distinctId

the distinctId

key

the Key


open fun isFeatureEnabled(distinctId: String, key: String, defaultValue: Boolean): Boolean

Returns if a feature flag is enabled, the feature flag must be a Boolean Docs https://posthog.com/docs/feature-flags and https://posthog.com/docs/experiments

Parameters

distinctId

the distinctId

key

the Key

defaultValue

the default value if not found


open fun isFeatureEnabled(distinctId: String, key: String, options: PostHogFeatureFlagOptions): Boolean

Returns if a feature flag is enabled, the feature flag must be a Boolean Docs https://posthog.com/docs/feature-flags and https://posthog.com/docs/experiments

Parameters

distinctId

the distinctId

key

the Key

options

the feature flag options containing defaultValue, groups, personProperties, and groupProperties