Skip to content

Instantly share code, notes, and snippets.

@parahall
Created May 7, 2018 21:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save parahall/6deebc3e5c193113c9e7ac9c9a7ddca4 to your computer and use it in GitHub Desktop.
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