pwittchen / prefser

Wrapper for Android SharedPreferences with object serialization and RxJava Observables
Apache License 2.0
229 stars 26 forks source link

Create new GitHub release of 1.0.4 #27

Closed pwittchen closed 9 years ago

pwittchen commented 9 years ago

Initial release notes for version 1.0.4:

1. Changed method names in the API from:

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:

prefser.getPreferences();

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.

pwittchen commented 9 years ago

New release is published.