-
Notifications
You must be signed in to change notification settings - Fork 195
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TrueTimeRx initial in Application.onCreate(), where I should add clear() for this disposable? #108
Comments
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 |
MarkVillacampa As far as I know, It is not equivalent, because thuypt This is how I handle it with retries:
|
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: