getSharedPreferences

open fun getSharedPreferences(@NonNull context: Context, @NonNull suffixName: String): SharedPreferenceStrategy

This method offers the possibility to save all your private preferences in a secure way, so let our SWCore do it for you.

Return

an instance of a custom shared preferences

Parameters

context

The application context

suffixName

a mandatory not empty prefix. (the key "preferences" not allowed as suffixName please do not use it otherwise IllegalArgumentException will be thrown)

Throws

be careful, this method may return an exception when the suffixName is empty or null

be careful, the suffixName should be different from "preferences", this key is not allowed here