code: public <T> Observable<T> getAndObserve(final String key, final TypeToken<T> typeTokenOfT,
        final T defaultValue) {
      return observe(key, typeTokenOfT, defaultValue) // start observing
          .mergeWith(
              Observable.defer(new Callable<ObservableSource<? extends T>>() { // then start getting
                @Override public ObservableSource<? extends T> call() throws Exception {
                  return Observable.just(get(key, typeTokenOfT, defaultValue));
                }
              }));
    }
docs: Gets value from SharedPreferences with a given key and type token
  as a RxJava Observable, which can be subscribed
  If value is not found, we can return defaultValue.
  Emit preference as first element of the stream even if preferences wasn't changed.
  
  @param key key of the preference
  @param typeTokenOfT type token of T (e.g. {@code new TypeToken<List<String>> {})
  @param defaultValue default value of the preference (e.g. "" or "undefined")
  @param <T> return type of the preference (e.g. String)
  @return Observable value from SharedPreferences associated with given key or default value