fun getString(key: String, defaultValue: String = ""): String { return prefs?.getString(key, defaultValue) ?: defaultValue }
If you tell me more about androidutility.v165 , I can generate a feature that fits perfectly — whether it’s a permission flow helper, a crash-resistant file cache, or a modern WorkManager job scheduler wrapper. androidutility.v165
fun init(context: Context, name: String = "app_prefs") { prefs = context.getSharedPreferences(name, Context.MODE_PRIVATE) } fun getString(key: String