Feature Flag Setup

A Feature Flag is a statement in your code that specifies how the app should behave when the flag is “on” or “off”. This logic can be used multiple times in your code.

Android (Java)
if (Apptimize.isFeatureFlagOn("new_feature_flag_variable")) {
   // ON
} else {
   // OFF

The variable name used (new_feature_flag_variable in the example above) should match the variable name within the “Create Code” tab of your feature flag. This links the Feature Flag in the Apptimize dashboard to your app’s code. We recommend using the “Create Code” option to generate the snippet you will use to avoid errors.