java.lang.IllegalStateException: Cannot invoke setValue on a background thread
I get the above error when I try to use setvalue:
data.setValue(arrayListLogReturn);
I understand that I can change this to postvalue, but then I lose observe functionality on the livedata.
data.postValue(arrayListLogReturn);
My question is how do I keep observe functionality and update the value ? Any help would be appreciated.