decodeOrDefault

fun <T> decodeOrDefault(deserializer: DeserializationStrategy<T>, tag: String, default: T): T

Decodes and deserializes from the SharedPreferences at the specified tag to the value of type T using the given deserializer

Parameters

deserializer

strategy used to decode the data

tag

key to decode data from

default

default value, if no object was encoded at tag