Repository navigation
running features
Features are resolved through variations of relevant experiences. When you run a feature, the SDK finds all experiences whose variations include a fullStackFeature change linked to that feature, evaluates targeting rules, buckets the visitor, and returns the resolved feature status and variable values. See the data model for the full resolution chain.
Returns a single feature's status and variable values for the current visitor.
val feature = ctx.runFeature("feature-key")
// Suppress the bucketing exposure (both the outbound network event and the
// in-process `bucketing` event) and limit evaluation to specific experiences:
val scopedFeature = ctx.runFeature(
"feature-key",
enableTracking = false,
experienceKeys = listOf("checkout-test")
)
// Note: enableTracking and experienceKeys are Kotlin parameters on
// runFeature itself, not fields of an attributes object — and this
// surface carries no typeCasting parameter.Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
| featureKey | string | Yes | The feature's unique key |
| attributes | object | No | Bucketing attributes (see creating a user context for the full attributes reference), plus: |
experienceKeys (string[]) -- limit evaluation to specific experiences only |
Returns all features with their status and variable values for the current visitor.
val features = ctx.runFeatures()
// Suppress the bucketing exposure (both the outbound network event and the
// in-process `bucketing` event) and limit evaluation to specific experiences:
val scopedFeatures = ctx.runFeatures(
enableTracking = false,
experienceKeys = listOf("checkout-test")
)
// Note: enableTracking and experienceKeys are Kotlin parameters on
// runFeatures itself, not fields of an attributes object — and this
// surface carries no typeCasting parameter.Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
| attributes | object | No | Bucketing attributes (see creating a user context for the full attributes reference), plus: |
experienceKeys (string[]) -- limit evaluation to specific experiences only |
Returns: An array of BucketedFeature objects.
Each resolved feature is returned as a BucketedFeature with the following fields:
| Field | Type | Description |
|---|---|---|
featureId |
string | The feature ID |
featureKey |
string | The feature key |
status |
string / FeatureStatus |
"enabled" or "disabled" (PHP uses the FeatureStatus enum) |
variables |
object / array | The feature variables with their resolved values |
End-to-end flow: initialize the SDK, create a user context, run a feature, and check its status and variables.
import com.convert.sdk.android.ConvertSDK
import com.convert.sdk.android.getString
val sdk = ConvertSDK.builder(applicationContext)
.sdkKey("YOUR_SDK_KEY")
.build()
sdk.onReady {
val context = sdk.createContext("user-unique-id")
val feature = context.runFeature("feature-key")
if (feature?.enabled == true) {
val ctaColor = feature.getString("ctaColor") ?: "#0066ff"
}
}Copyrights © 2026 All Rights Reserved by Convert Insights, Inc.
Getting Started
Android SDK
- Quickstart
- Installation
- Initialization
- Configuration
- Return Types & Models
- Code Examples
- Offline Behavior
- Tracking Control
- Google Play Data Safety
- Java Interop
Core Concepts
- Experiences & Variations
- Feature Flags
- Bucketing Algorithm
- Rule Evaluation
- Segments
- Data Management
- Event System
- API Communication
How-To Guides
- Running Experiences
- Running Features
- Tracking Conversions
- Visitor Context
- Persistent DataStore
- Troubleshooting
- Direct Tracking Endpoint
- QA & Preview
- Mutually Exclusive Experiments
Contributing