I need help with since Coroutine never calls API a...
# coroutines
g
I need help with since Coroutine never calls API after job either cancelled or pending. Details: https://stackoverflow.com/questions/60216513/coroutine-never-calls-api-after-job-either-cancelled-or-pending
m
You need to observe on the LiveData outside of the onClick. You’d want the view model to be a class level variable and just observe the LiveData after setContentView. your viewModel function should just make the api call and set the live data value on success