07/13/2022, 2:11 PM
Observe the state of a Worker withou LiveData So, I am using workmanager to retrieve data from an FTP server. I have to display one type or information or another type deppending on the state of the worker. I was using getWorkInfoByIdLiveData on the viewmodel and I was observing the state of the worker on the activity. But, as the Observer is almost deprecated I am trying to use Flow instead. The problem that I have is that I don't know why, I can't use the asStateFlow() on the livedata. <a href="