Small library to convert from Google's Task to RxJava2.
- Setup with JitPack
- Use in code:
val task = Tasks.forResult(42)
task.asSingle().subscribe{ theAnswer -> searchQuestion(theAnswer) }
RxTasks is build on kotlin extension functions, in order to use it in Java you need to use RxTasksKt
as follows:
Task<Integer> task = Tasks.forResult(42);
RxTasksKt.asSingle(task).subscribe(theAnswer -> searchQuestion(theAnswer));