Let's start by creating a source Observable using Observable.create(). A source Observable is an Observable from where emissions originate. It is the starting point of our Observable chain (pipeline of operators). The Observable.create() factory allows us to create an Observable by providing a lambda that accepts an Observable emitter.
Actually, the create() method accepts as a parameter an object of the ObservableOnSubscribe type that has only one method, subscribe(ObservableEmitter emitter), which accepts an ObservableEmitter type, which, in turn, extends the Emitter interface that has three methods: onNext(), onError(), and onComplete(). Since ObservableOnSubscribe is a functional interface – it has one abstract ...