Hey everyone, I have a question I can not seem to find an answer to. If I have a background function that sends updates to my activity, how can I constantly send those updates to the UI of a fragment? I know you can do this with onCreate but I need to keep a constant flow of updates. Hope that makes sense.
:stackoverflow: 2
k
kagomez
01/25/2018, 12:18 AM
interfaces could solve your problem
👍 1
d
dave08
01/25/2018, 3:29 AM
Or coroutines, it could also save you the mess of background tasks, but there's a learning curve... see kotlinx.coroutines on github the starter's guide and the UI guide....
But there' a few helper functions in Anko for coroutines I haven't tried yet...