Skip to content
Konstantin Mikheev edited this page Feb 2, 2016 · 1 revision

Any background task can be wiped out by Android at any moment. If we want to deliver a seamless and solid user experience, we need to restart them automatically.

Nucleus has several methods for restarting background tasks: restartableFirst, restartableLatestCache and restartableReplay. They differ by the way they deliver background task results from Presenter into View.

First delivers only the first value:

LatestCache delivers only the last value and it also caches it to re-deliver it every time View becomes attached to Presenter.

Replay delivers all values and it replays them all every time View becomes attached to Presenter.

Clone this wiki locally