In this post I will explain with example the difference between autoConnect and connect. In terms of similarities both are used with ConnectableObservable which is an Hot Observable. Both tells the Observable when to start emitting items. The difference being when to tell the Observable, at what point to start emitting items. For example, if…… Continue reading autoConnect vs connect method
Month: July 2021
Cold Observable vs Hot Observable
In this post under RxJava, I will explain the difference between Cold Observable and Hot Observable with the help of java code which will create both Hot and Cold Observable and emits items from both of them. You can compare the output of Hot and Cold Observable to understand there difference. In my previous post…… Continue reading Cold Observable vs Hot Observable
Creating Custom Observable Using Callback Style
In this post under RxJava, I will show with example how to create a custom Observable using Callback style. In Callback style, a code is executed when a specific event occurs. In our case, the event is Observer subscribing to Observable. When this event occurs the callback code is called. For our example, we create…… Continue reading Creating Custom Observable Using Callback Style