Helper class for storing/retrieving preferences from tray.
If you use this class prior to initializing a SpeedifySDK instance, you must call Init first.
- Since
- 5.6
|
static void | Init (Context context) |
|
static void | remove (String key) |
|
static< T > void | put (String key, T value) |
|
static boolean | getBoolean (String key, boolean defValue) |
|
static float | getFloat (String key, float defValue) |
|
static int | getInt (String key, int defValue) |
|
static long | getLong (String key, long defValue) |
|
static String | getString (String key, String defValue) |
|
static boolean | has (String key) |
|
◆ getBoolean()
static boolean com.speedify.speedifysdk.Preferences.getBoolean |
( |
String |
key, |
|
|
boolean |
defValue |
|
) |
| |
|
static |
- Parameters
-
key | preference key to get |
defValue | default value of key not present |
- Returns
- value of key in preferences
- Since
- 5.6
◆ getFloat()
static float com.speedify.speedifysdk.Preferences.getFloat |
( |
String |
key, |
|
|
float |
defValue |
|
) |
| |
|
static |
- Parameters
-
key | preference key to get |
defValue | default value of key not present |
- Returns
- value of key in preferences
- Since
- 5.6
◆ getInt()
static int com.speedify.speedifysdk.Preferences.getInt |
( |
String |
key, |
|
|
int |
defValue |
|
) |
| |
|
static |
- Parameters
-
key | preference key to get |
defValue | default value of key not present |
- Returns
- value of key in preferences
- Since
- 5.6
◆ getLong()
static long com.speedify.speedifysdk.Preferences.getLong |
( |
String |
key, |
|
|
long |
defValue |
|
) |
| |
|
static |
- Parameters
-
key | preference key to get |
defValue | default value of key not present |
- Returns
- value of key in preferences
- Since
- 5.6
◆ getString()
static String com.speedify.speedifysdk.Preferences.getString |
( |
String |
key, |
|
|
String |
defValue |
|
) |
| |
|
static |
- Parameters
-
key | preference key to get |
defValue | default value of key not present |
- Returns
- value of key in preferences
- Since
- 5.6
◆ has()
static boolean com.speedify.speedifysdk.Preferences.has |
( |
String |
key | ) |
|
|
static |
- Parameters
-
key | preference key to check |
- Returns
- if key is present in preferences
- Since
- 12.3
◆ Init()
static void com.speedify.speedifysdk.Preferences.Init |
( |
Context |
context | ) |
|
|
static |
- Parameters
-
context | an Android Context |
- Since
- 5.8
◆ put()
static <T> void com.speedify.speedifysdk.Preferences.put |
( |
String |
key, |
|
|
T |
value |
|
) |
| |
|
static |
- Parameters
-
key | preference key to put |
value | preference value to put |
- Since
- 5.6
◆ remove()
static void com.speedify.speedifysdk.Preferences.remove |
( |
String |
key | ) |
|
|
static |
- Parameters
-
key | preference key to remove |
- Since
- 5.6
The documentation for this class was generated from the following file: