You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Possible workaround is to keep strong reference to the subscription.
I would prefer not to move listener to Operator because in this case we create lifecycle where it should not be. We can not fully solve this issue such way. In any case we should keep strong ref to listener, keeping it explicitly in operator, or implicitly in subscription.
Totally agree with @Yarikx. fromSharedPreferencesChanges implemented properly and holds a reference to the listener as long as it's needed. The api consumer is the one who responsible for keeping a reference to the Subscription and canceling it when necessary.
Somebody tested this observable?
First time i used it, and it never been called.
Seems like a known issue: http://stackoverflow.com/questions/2542938/sharedpreferences-onsharedpreferencechangelistener-not-being-called-consistently/3104265#3104265
Possible solution: move listener field from method to Operator class.
The text was updated successfully, but these errors were encountered: