I have 3 tasks A,B, and C . I want to observe the live data for this chain and have a progress bar that shows the work in progress and once work its completed it should disable the progress bar.
// One Time work for A class
OneTimeWorkRequest Awork = new OneTimeWorkRequest
.Builder(A.class)
.setConstraints(Miscellaneous.networkConstraint())
.addTag("A")
.build();
//same for B and C
//work chain
WorkContinuation syncChain = WorkManager.getInstance()
.beginWith(Awork)
.then(Bwork)
.then(Cwork);
syncChain.enqueue();