Guest User

Untitled

a guest
Jan 23rd, 2019
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. // In your UI (activity, fragment, etc)
  2. WorkManager.getInstance().getWorkInfoByIdLiveData(uploadWorkRequest.id)
  3. .observe(lifecycleOwner, Observer { workInfo ->
  4. // Check if the current work's state is "successfully finished"
  5. if (workInfo != null && workInfo.state == WorkInfo.State.SUCCEEDED) {
  6. displayImage(workInfo.outputData.getString(KEY_IMAGE_URI))
  7. }
  8. })
Add Comment
Please, Sign In to add comment