I\'ve had a look at the codelab for WorkManager plus some examples on here, but everything in code I have seen is either related to doing work locally on the device or work uplo
This is initial thought. Somebody please correct me if i'm wrong.
my worker would already have posted that it was successful and it probably would not proceed with the callback, right?
we can use the callback from API reponse, to construct output Data of the worker and set it using worker.setOutputData()
Then listen to the LiveData
from workManager. From this workstatus we can get outputData using, workStatus.getOutputdata()
. This data can give us the API response we want.
We can pass this response to next worker in the worker chain to carry out tasks like updating local DB.