encode

fun <T> encode(serializer: SerializationStrategy<T>, tag: String, value: T)

Serializes and encodes the given value into the SharedPreferences at the specified tag using the given serializer.

Parameters

serializer

strategy used to encode the data

tag

key to encode data to

value

value to encode