Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // In your UI (activity, fragment, etc)
- WorkManager.getInstance().getWorkInfoByIdLiveData(uploadWorkRequest.id)
- .observe(lifecycleOwner, Observer { workInfo ->
- // Check if the current work's state is "successfully finished"
- if (workInfo != null && workInfo.state == WorkInfo.State.SUCCEEDED) {
- displayImage(workInfo.outputData.getString(KEY_IMAGE_URI))
- }
- })
Add Comment
Please, Sign In to add comment