Ayomide
01/09/2021, 6:01 PMSharedFlow
- I'm trying to figure out how to keep the web socket session (DefaultClientWebSocketSession
) running in the background so that I can collect the SharedFlow
messages and display them on screen as they stream in.
I tried using coroutineScope.launch{}
but it seems like the web socket session would stop as soon as the coroutine scope block ended. Not sure what to do to make sure the process runs forever in the backgroundRob
01/09/2021, 6:30 PMRob
01/09/2021, 6:33 PMawaitCancellation()
at the end of the callback.Rob
01/09/2021, 6:36 PMAyomide
01/09/2021, 7:47 PM