Skip to main content
Version: Next

A/B Testing

Configure

101XP SDK uses Firebase for A/B testing. Respectively, Firebase needs to be configured. Check that you have google-services.json file in the root directory of your project. If you need that file, ask your manager.

Usage

To get the required parameter for A/B testing, use these methods of the Platform101XP class:

// Java
Long abLong = Platform101XP.testABGetLong(String key, long defaultValue);

long testABGetLong(String key, long defaultValue);
String testABGetString(String key, String defaultValue);
double testABGetDouble(String key, double defaultValue);
boolean testABGetBoolean(String key, boolean defaultValue);

// Kotlin
val abLong = Platform.testABGetLong(key: String?, defaultValue: Long)

testABGetLong(key: String?, defaultValue: Long): Long
testABGetString(key: String?, defaultValue: String?): String
testABGetDouble(key: String?, defaultValue: Double): Double
testABGetBoolean(key: String?, defaultValue: Boolean): Boolean

If Firebase doesn't have the required parameter the default value is returned.