Skip to content

Instantly share code, notes, and snippets.

@parahall
Created May 7, 2018 21:28
Show Gist options
  • Select an option

  • Save parahall/6deebc3e5c193113c9e7ac9c9a7ddca4 to your computer and use it in GitHub Desktop.

Select an option

Save parahall/6deebc3e5c193113c9e7ac9c9a7ddca4 to your computer and use it in GitHub Desktop.
WorkManager.getInstance(context).getStatusById(work.getId())
.observe(lifecycleOwner, status -> {
// Do something with the status
if (status != null && status.getState().isFinished()) { … }
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment