O'Reilly logo

Reactive Android Programming by Tadas Subonis

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Completable

Since Completable can basically process just two types of actions--onComplete and onError--we will cover it very briefly.

Completable has many static factory methods available to create it but, most often, it will just be found as a return value in some other libraries. For example, the Completable can be created by calling the following:

Completable completable = Completable.fromAction(() -> {    log("Let's do something");});

Then, it is to be subscribed with the following:

completable.subscribe(() -> {    log("Finished");}, throwable -> {log(throwable);});

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required