//sorisdk/com.iplateia.sorisdk/getPreference
getPreference
[androidJvm]
fun getPreference(context: Context, key: String): String?
Retrieve a string preference from shared preferences.
Return
The value of the preference, or null if not found
Parameters
androidJvm
context | The context from which to access shared preferences |
key | The key for the preference |
[androidJvm]
fun getPreference(context: Context, key: String, defaultValue: String): String
Retrieve a string preference from shared preferences with a default value.
Return
The value of the preference, or the default value if not found
Parameters
androidJvm
context | The context from which to access shared preferences |
key | The key for the preference |
defaultValue | The default value to return if the preference is not found |