com.splitforce.lib
Interface SfManager

All Known Implementing Classes:
SplitforceManager

public interface SfManager


Method Summary
 java.lang.String getAppId()
           
 java.lang.String getAppPassword()
           
 android.content.Context getContext()
           
 SfVariation getExperiment(java.lang.String name)
          Retrieve an experiment that was previously initialized.
 void init(android.content.Context context)
          Initializes the Splitforce library.
 void initExperiment(java.lang.String name, boolean forceReload, SfListener listener)
          * Initializes a Spilitforce Experiment from the manifest stored on the device.
 void initExperiment(java.lang.String name, SfListener listener)
          Initializes a Splitforce Experiment from the manifest stored on the device.
 boolean isInitialized()
          Determines if Splitforce sdk is initialized.
 SplitforceManager setAppId(java.lang.String appId)
           
 SplitforceManager setAppPassword(java.lang.String appPassword)
           
 SplitforceManager setDebug(boolean debug)
          Turn debug mode on or off.
 

Method Detail

init

void init(android.content.Context context)
Initializes the Splitforce library. Data will be synced with the Splitforce servers.

Parameters:
context - Your app's context from Activity or Application

initExperiment

void initExperiment(java.lang.String name,
                    boolean forceReload,
                    SfListener listener)
* Initializes a Spilitforce Experiment from the manifest stored on the device. Implementors of SfListener will receive a callback to SfListener.onInitExperiment(com.splitforce.lib.SfVariation)

Parameters:
name - The name of the experiment
forceReload - Load a new variation even if one was previously loaded.
listener - implementation of the listener.

initExperiment

void initExperiment(java.lang.String name,
                    SfListener listener)
Initializes a Splitforce Experiment from the manifest stored on the device. Implementers of SfListener will receive a callback to SfListener.onInitExperiment(com.splitforce.lib.SfVariation)

Parameters:
name - The name of the experiment
listener - implementation of the listener

getExperiment

SfVariation getExperiment(java.lang.String name)
Retrieve an experiment that was previously initialized.

Parameters:
name - The name of the experiment.
Returns:
SplitforceVariation or null

getContext

android.content.Context getContext()

isInitialized

boolean isInitialized()
Determines if Splitforce sdk is initialized.

Returns:
true if initialized otherwise false.

setDebug

SplitforceManager setDebug(boolean debug)
Turn debug mode on or off. The library logs a lot more in debug mode.

Parameters:
debug - flag
Returns:
the SplitforceManager instance for method chaining

setAppId

SplitforceManager setAppId(java.lang.String appId)

setAppPassword

SplitforceManager setAppPassword(java.lang.String appPassword)

getAppId

java.lang.String getAppId()

getAppPassword

java.lang.String getAppPassword()