put

fun SharedPreferences.put(key: String, newValue: Any)

Sets the key value in the preferences editor to newValue, and calls SharedPreferences.Editor.apply.