I am using OneTimeWorkRequest For Downloading Weburls which are loaded in Asset Folder..Inside doWork() I am writing Download Code, Download is enqueued and is completed in a specified directory but after that i don't get the Result Success in Activity where i am using
getWorkInfoByIdLiveData
My Code Snippet
WorkManager.getInstance().getWorkInfoByIdLiveData(oneTimeWorkRequest.getId()).observe(this, new Observer<WorkInfo>() {
@Override
public void onChanged(@androidx.annotation.Nullable WorkInfo workInfo) {
//getting State of WorkInfo
}
});
@Override
public Result doWork() {
//call for Download URLs
return Result.success(data1);
}