android-components / mozilla.components.service.experiments / ExperimentsInternalAPI


open class ExperimentsInternalAPI (source)

This is the main experiments API, which is exposed through the global Experiments object.


Name Summary
initialize fun initialize(applicationContext: <ERROR CLASS>, configuration: Configuration, onExperimentsUpdated: () -> Unit = null): Unit
Initialize the experiments library.
withExperiment fun withExperiment(experimentId: String, block: (branch: String) -> Unit): Unit
Performs an action if the user is part of the specified experiment

Extension Functions

Name Summary
loadResourceAsString fun Any.loadResourceAsString(path: String): String
Loads a file from the resources folder and returns its content as a string object.


Name Summary
Experiments object Experiments : ExperimentsInternalAPI
The main Experiments object.