Hi there, I am confused on the different between `...
# coroutines
l
Hi there, I am confused on the different between
lifecycleScope.launchWhenResumed
and
lifecycle.repeatOnLifecycle(Lifecycle.State.RESUMED)
, so could anyone explain it for me? Thanks in advance!
t
launchWhenResumed
does not cancel when the lifecycle goes to pause, only when the lifecycle is destroyed.
repeatOnLifecycle
with
RESUMED
does cancel when the lifecycle goes to pause.
l
Thanks!