Observable<String> from(final SharedPreferences sharedPreferences);
Observable<String> fromDefaultPreferences();
<T> Observable<T> getObservable(final String key, final Class classOfT, final T defaultValue)
to:
Observable<String> observe(final SharedPreferences sharedPreferences);
Observable<String> observeDefaultPreferences();
<T> Observable<T> observe(final String key, final Class classOfT, final T defaultValue)
2. Removed the following methods from the public API:
<T> T get(String key, Class classOfT);
<T> Observable<T> getObservable(final String key, final Class classOfT)
Now, we can read data only with defined default value like in regular SharedPreferences.
3. Fixed bug with returning default Boolean value as String
It was reported in #22. Now, Prefser uses default methods from SharedPreferences for reading and saving data when it's possible. Other kind of data are serialized to JSON format via Gson library and stored as Strings.
4. Added example of using library with PreferenceActivity
It's available in app-preference-activity directory.
5. Added getPreferences() method to the public API
This method can be used for getting SharedPreferences object in the following way:
Initial release notes for version 1.0.4:
1. Changed method names in the API from:
to:
2. Removed the following methods from the public API:
Now, we can read data only with defined default value like in regular
SharedPreferences
.3. Fixed bug with returning default Boolean value as String It was reported in #22. Now, Prefser uses default methods from
SharedPreferences
for reading and saving data when it's possible. Other kind of data are serialized to JSON format via Gson library and stored as Strings.4. Added example of using library with PreferenceActivity It's available in app-preference-activity directory.
5. Added getPreferences() method to the public API This method can be used for getting
SharedPreferences
object in the following way:We can find more information in README.md file.
6. Updated Unit Tests Removed tests, which are no longer valid and added a few new tests.