I’m trying to send data from an android service to an activity. I would usually do this with a broadcast receiver, but I was wondering if this was something I could use a Coroutine channel for and how would that work?
11/28/2019, 5:52 PM
You could create an event bus using private channel; exposing a flow and having suspend functions which send to the channel
11/28/2019, 7:03 PM
Or follow the examples they have of such things in the architecture patterns, using a
. As usual, 10 different ways to do it.
11/28/2019, 7:37 PM
@codeslubber What examples? Could you provide the link?
12/01/2019, 9:58 AM
-Handler (send message)
12/01/2019, 10:06 AM
Was looking for a solution based on Coroutine channels, but I figured it out based on Paul’s suggestion