I perform network stuff inside ViewModel that repeat its fetching with interval of 10 seconds with RxJava. However I do not want to fetch data from this API when my Fragment is not visible to screen for example is when I opened an Activity on a top of it I will have a code like if(!isResume) return. My question will be, is it okay to use a MutableLiveData<Boolean> where value will be updated in onResume and onPause so I can just ignore network request if not resume or is it against the concept of MVVM? We can do this but not sure if it is okay to do so.