Android LiveData / architecture components integration
See original GitHub issueWe need an integration module for Android LiveData
architecture components that provides read-to-use extensions for their use with coroutine in a similar style to reactive integration modules. See also #232
Issue Analytics
- State:
- Created 6 years ago
- Reactions:58
- Comments:26 (13 by maintainers)
Top Results From Across the Web
LiveData overview - Android Developers
LiveData in an app's architecture ... LiveData is lifecycle-aware, following the lifecycle of entities such as activities and fragments. Use ...
Read more >Bind layout views to Architecture Components
Bind layout views to Architecture Components · Use LiveData to notify the UI about data changes · Use ViewModel to manage UI-related data...
Read more >Use Kotlin coroutines with lifecycle-aware components
Lifecycle-aware components provide first-class support for coroutines for logical scopes in your app along with an interoperability layer ...
Read more >Handling Lifecycles with Lifecycle-Aware Components
LiveData , a lifecycle-aware component, allows your app to automatically update the UI when your user changes locations. Stopping and starting ...
Read more >Use LiveData with ViewModel - Android Developers
In this codelab, you learn how to use LiveData, one of the Architecture components. Convert the app data in the ViewModel to LiveData....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Uploaded to github working android sample.
@elizarov
Me and Andras wanted to share some progress on coroutines + arch work. Let’s speak about
LiveData
first, as it is most used component which is used inRoom
andViewModel
.Our initial idea was to wrap
LiveData
withConflatedBroadcastChannel
which basically act the same. But implementation is error prone and may not reflect all the future changes which google may make.So we decided to implement it in different way.
Basically you subscribe to
LiveData
but as a return type getChannel
, not anObservable
.Usage sample:
This is a nice way to bridge
LiveData
-Channels
.