public final class Flaggr
extends java.lang.Object
Use with(Context) for the global singleton instance.
| Modifier and Type | Field and Description |
|---|---|
protected static java.lang.String |
FLAGGR_SHARED_PREFERENCES_PREFIX |
| Modifier and Type | Method and Description |
|---|---|
boolean |
isActive(int resId,
FlagContextInterface flagContext)
Method to call to check that a flag is activated
|
boolean |
isActive(java.lang.String flagName,
FlagContextInterface flagContext)
Method to call to check that a flag is activated
|
void |
loadConfig(java.lang.String configUrl)
Start a request to download config url.
|
void |
reloadConfig()
Reload flags for json config.
|
static Flaggr |
with(android.content.Context context)
The global default
Flaggr instance. |
protected static final java.lang.String FLAGGR_SHARED_PREFERENCES_PREFIX
public static Flaggr with(android.content.Context context)
Flaggr instance.context - the activty or application context.public void loadConfig(java.lang.String configUrl)
configUrl - url of json config.public void reloadConfig()
public boolean isActive(int resId,
FlagContextInterface flagContext)
resId - The flag name resource idflagContext - the context for checking the flagpublic boolean isActive(java.lang.String flagName,
FlagContextInterface flagContext)
flagName - The flag nameflagContext - the context for checking the flag