Our great sponsors
-
Dispatch
Automatic CoroutineDispatcher injection and extensions for kotlinx.coroutines (by RBusarow)
-
event-emitter
[ACTIVE] The event emitter allows you to register multiple observers, but enqueue events while there are no observers.
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
-
androidx
Development environment for Android Jetpack extension libraries under the androidx namespace. Synchronized with Android Jetpack's primary development branch on AOSP.
-
Kotlin_Flow_To_The_View
PoC using Flow completely on an Android Projet with MVVM architecture. No LiveData. The advantage over simply using the viewModelScope is the fact that 5 seconds after leaving the application (not killing it !), the coroutine is cancelled, avoid possibly unnecessary work.
-
LifecycleCollector
This library provides you convenience extension functions to easier collect Kotlin Flows lifecycle-aware from Activities or Fragments. It gives you a more convenient way to collect Flows in LiveData-fashion.
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
Dispatch has Lifecycle extensions which automatically start/stop without leaking pausing behavior. It has quite a few other shiny features as well.
That's why I wrote EventEmitter and never had a problem.
This is the implementation of CoroutineLiveData: https://github.com/androidx/androidx/blob/androidx-main/lifecycle/lifecycle-livedata-ktx/src/main/java/androidx/lifecycle/CoroutineLiveData.kt
I'll let you see for yourself : https://github.com/NinoDLC/Kotlin_Flow_To_The_View
You can have a look at my little library, which is gives you three extension functions on flows: LifecycleCollector. However, it uses the experimental repeatOnLifecycle() under the hood.