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
You don't need to dispose of it. If you call TrueTimeRx in your Application, it means its lifetime is tried to the lifetime of the application, so you never want to stop observing it. When either a successful time or an error comes through the subscription, the subscription will be closed, so you wont need to stop observing it early.
For cleanliness, I've added the disposables.clear() call in the onTerminate method which would be the Application equivalent of onDestroy.
Regarding example, we got a
Disposable
at timeTrueTimeRx
initial inApplication.onCreate()
, it should be added in aCompositeDisposable
like this:private CompositeDisposable disposables;
disposables.add(trueTimeRxDisposable)
Problem is we don't have something like
onDestroy
inApplication
layer, so where and when I should calldisposables.clear()
?The text was updated successfully, but these errors were encountered: