SharedPreferenceManager
class SharedPreferenceManager(context: Context, preferenceName: String, encrypted: Boolean = false, val gson: Gson = Gson())
SharedPreferenceManager is android.content.SharedPreferences class within Arc
Author
jimlyas
Since
06 Nov 2023
Parameters
context
Context used to create the instance of android.content.SharedPreferences
preferenceName
String name for the android.content.SharedPreferences
encrypted
Boolean to define does the android.content.SharedPreferences is encrypted or not, if true, will use EncryptedSharedPreferences. And if not, will use default android.content.SharedPreferences from Context
gson
Gson instance that used for parsing object to String
Functions
Link copied to clipboard
Function to clear all values from the preference
Link copied to clipboard
Function to get Boolean value from preference
Link copied to clipboard
Function to remove value from preference based on given key
Link copied to clipboard
Function to set a Boolean value to preference