This is what I got to do
UploadCompleteListener is a custom interface that acts as a callback.
@Overrider
public Result doWork() {
mUpLoadDataService.uploadInspectionData(new UpLoadDataService.UploadCompleteListener() {
@Override
public void uploadComplete() {
return Result.success(); //this is what I want to do
}
@Override
public void uploadFailed(String reason) {
return Result.failure(); //this is what I want to do
}
});
return null;
}
Is it Possible?
If possible in any way please response soon. I can provide more details if you need it.