Using Google's mvvm architecture components Github browser sample as a reference, how would one cancel a viewmodel hosted, live data observed, retrofit network request? :)
Maybe I'm reading it wrong, but if network conditions are poor and requests take for example 30 seconds, each request should be cancelled otherwise many requests might be launched if the app is opened and closed rapidly. How would a well designed app handle this?
The callback when the livedata observer is removed can be accessed by overriding onInactive here I think. I could try cancelling all calls here, but what if I don't want to cancel some calls for some reason?
I'm guessing Facebook doesn't cancel trying to load your feed when you hit the back button.