Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @NonNull
- @Override
- public Result doWork() {
- if(Util.isInternetConnected()){
- // do something
- return Result.SUCCESS;
- }
- else {
- return Result.FAILURE;
- }
- // (Returning RETRY tells WorkManager to try this task again
- // later; FAILURE says not to try again.)
- }
Add Comment
Please, Sign In to add comment