Lance Gao
04/28/2023, 3:39 AMlifecycleScope.launchWhenResumed
and lifecycle.repeatOnLifecycle(Lifecycle.State.RESUMED)
, so could anyone explain it for me? Thanks in advance!Ian Lake
04/28/2023, 3:44 AMrepeatOnLifecycle
talks about this: https://link.medium.com/qRILExz8lzblaunchWhen
APIs would actually keep the flow active even when you weren't resumed, it would just pause actually delivering any results to your UIrepeatOnLifecycle
actually cancels the work when you go below that minimum state, ensuring you aren't wasting resources in the backgroundLance Gao
04/28/2023, 3:46 AMErick Sumargo
05/01/2023, 2:43 PMlaunchWhenX
is already deprecated in favor of repeatOnLifecycle
https://twitter.com/manuelvicnt/status/1633823555208245248?t=REm1e2QS2Czq4Ed44hbCrg&s=19Sergio C.
05/01/2023, 6:23 PM