Beaconstac Android  0.9.9
com.mobstac.beaconstac.utils.MSSharedPreference Class Reference

Static Public Member Functions

static boolean put (final Context context, final String key, final String value)
 
static boolean put (final Context context, final String key, final boolean value)
 
static boolean put (final Context context, final String key, final int value)
 
static boolean put (final Context context, final String key, final long value)
 
static boolean put (final Context context, final String key, final float value)
 
static String getString (final Context context, final String key, final String defaultValue)
 
static boolean getBoolean (final Context context, final String key, final boolean defaultValue)
 
static int getInt (final Context context, final String key, final int defaultValue)
 
static long getLong (final Context context, final String key, final long defaultValue)
 
static float getFloat (final Context context, final String key, final float defaultValue)
 
static boolean setFact (final Context context, String key, final String value, final boolean isUserPref)
 
static boolean setFact (final Context context, String key, final boolean value, final boolean isUserPref)
 
static boolean setFact (final Context context, String key, final int value, final boolean isUserPref)
 
static boolean setFact (final Context context, String key, final long value, final boolean isUserPref)
 
static boolean setFact (final Context context, String key, final float value, final boolean isUserPref)
 
static String getFact (final Context context, String key, final String defaultValue, final boolean isUserPref)
 
static boolean getFact (final Context context, String key, final boolean defaultValue, final boolean isUserPref)
 
static int getFact (final Context context, String key, final int defaultValue, final boolean isUserPref)
 
static long getFact (final Context context, String key, final long defaultValue, final boolean isUserPref)
 
static float getFact (final Context context, String key, final float defaultValue, final boolean isUserPref)
 
static HashMap< String, Object > getAllKeys (Context context, final boolean isUserPref)
 
static void clearAllKeys (Context context, final boolean isUserPref)
 
static boolean setFact (final Context context, String key, final String value)
 
static boolean setFact (final Context context, String key, final boolean value)
 
static boolean setFact (final Context context, String key, final int value)
 
static boolean setFact (final Context context, String key, final long value)
 
static boolean setFact (final Context context, String key, final float value)
 
static String getFact (final Context context, String key, final String defaultValue)
 
static boolean getFact (final Context context, String key, final boolean defaultValue)
 
static int getFact (final Context context, String key, final int defaultValue)
 
static long getFact (final Context context, String key, final long defaultValue)
 
static float getFact (final Context context, String key, final float defaultValue)
 
static HashMap< String, Object > getAllKeys (Context context)
 
static void clearAllKeys (Context context)
 

Member Function Documentation

static void com.mobstac.beaconstac.utils.MSSharedPreference.clearAllKeys ( Context  context,
final boolean  isUserPref 
)
static

clears all keys in facts based on isUserPref

Parameters
contextinstance of Context
isUserPrefboolean
static HashMap<String, Object> com.mobstac.beaconstac.utils.MSSharedPreference.getAllKeys ( Context  context,
final boolean  isUserPref 
)
static

get all keys in facts based on isUserPref

Parameters
contextinstance of Context
isUserPrefboolean
Returns
map of all keys
static String com.mobstac.beaconstac.utils.MSSharedPreference.getFact ( final Context  context,
String  key,
final String  defaultValue,
final boolean  isUserPref 
)
static

Get facts

Parameters
contextof type Context
keyof type String
defaultValueof mentioned Type
Returns
fact
static int com.mobstac.beaconstac.utils.MSSharedPreference.getInt ( final Context  context,
final String  key,
final int  defaultValue 
)
static

This was needed to be added due to a previous bug where we were storing Long instead of Integer values

static boolean com.mobstac.beaconstac.utils.MSSharedPreference.setFact ( final Context  context,
String  key,
final String  value,
final boolean  isUserPref 
)
static

Set facts

Parameters
contextof type Context
keyof type String
valueof the mentioned type

The documentation for this class was generated from the following file: