public interface UnbluPreferencesStorage
createSharedPreferencesStorage(Context).
IMPORTANT: if you change the custom storage, please be aware that you are somehow capable of migrating the old data to the new storage.
| Modifier and Type | Method and Description |
|---|---|
static UnbluPreferencesStorage |
createSharedPreferencesStorage(android.content.Context context)
Creates a default implementation of
UnbluPreferencesStorage which stores the preferences inside the SharedPreferences of the app with mode Context.MODE_PRIVATE |
java.lang.String |
get(java.lang.String key)
A preference should be read from the storage
|
void |
put(java.lang.String key,
java.lang.String value)
A preference should be stored in the storage
|
@NonNull static UnbluPreferencesStorage createSharedPreferencesStorage(@NonNull android.content.Context context)
UnbluPreferencesStorage which stores the preferences inside the SharedPreferences of the app with mode Context.MODE_PRIVATEcontext - The context of the applicationSharedPreferencesvoid put(@NonNull
java.lang.String key,
@Nullable
java.lang.String value)
key - The key of the preferencevalue - The value for the given key@Nullable
java.lang.String get(@NonNull
java.lang.String key)
key - The key of the preference