getString

fun getString(key: String): String?

Retrieve a string value from SharedPreferences.

Return

The string value associated with the key (default is null if not found).

Parameters

key

The key associated with the string value.