Hey everyone, I have a question I can not seem to ...
# android
t
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
interfaces could solve your problem
👍 1
d
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...