Introducing ReactiveBus

Mar 11, 2018
java, rxjava, android

Today, I’ve released my another tiny project. It’s a very simple implementation of Event Bus with RxJava 2 under the hood. This library is compatible with Java 1.7 or higher. I didn’t use Java 1.8 or 1.9 because I wanted to make it compatible with Android apps. You can use it as follows: Bus bus = ReactiveBus.create(); Disposable observer = bus.receive().subscribe(new Consumer<Event>() { @Override public void accept(Event event) { // handle event here } }); Once, we created Event Bus object and our observer (or more precisely: disposable subscriber), we can start sending events: ...

DroidCon Poland 2017 - Is your app really connected?

Dec 2, 2017
android, java, rxjava, conferences, open-source

Yesterday, I gave a presentation about connectivity in the Android apps during the DroidCon Poland 2017 Conference in Kraków. Below, you can see slides from this presentation. View slides on SpeakerDeck There’s also tweet related to this presentation from DroidCon Kraków: Piotr Wittchen tells us about how we can we keep the track of network 🌎 or Internet connectivity changes in our app 📱🆘🙂 pic.twitter.com/7YGGzNJeb2 — droidcon Kraków (@droidconkr) December 2, 2017 I hope, you enjoyed it. ...

Simple reactive HTTP client and server with RxJava, Vert.x and Android

Nov 9, 2017
android, java, rxjava

During Hack Your Career event at the Silesian University of Technology, I’ve prepared a presentation titled Reactive Programming - Efficient Server Applications with a colleague from work. Arek told about theory of Reactive Programming, shown basic concepts, data types and a few examples in the code. During my part of the presentation, I’ve wrote a very simple server and client in Java (9 on the server, 7 on the client) with Vert. ...

JDD 2017 - Get ready for java.util.concurrent.Flow! - summary

Oct 5, 2017
java, rxjava, conferences

Recently on the JDD 2017 conference, I gave a presentation regarding introduction to Reactive Streams standard in Java 9. I also talked about existing implementations of this standard with the strongest focus on RxJava2 and created simple Reactive Streams implementation in pure Java 9 during the presentation. Below, you can find slides from this talk. View presentation on SpeakerDeck Code snippets shown during this presentation are available at https://github.com/pwittchen/java-flow-experiments. I have done a tiny live coding session during this talk. ...

Introducing ReactiveAirplaneMode

Aug 15, 2017
android, java, rxjava, open-source

I’m continuing Rxfication of the Android. Recently I released brand new library called ReactiveAirplaneMode. As you may guess, it allows listening Airplane mode on Android device with RxJava observables. A usual I’ve hidden all implementation details, BroadcastReceivers and rest of the Android related stuff behind RxJava abstraction layer, so API is really simple. Just take a look on that: ReactiveAirplaneMode.create() .observe(context) .subscribeOn(Schedulers.io()) .observeOn(AndroidSchedulers.mainThread()) .subscribe(isOn -> textView.setText(String.format("Airplane mode on: %s", isOn. ...

Releasing ReactiveNetwork v. 0.10.0

Jul 20, 2017
android, java, rxjava, open-source

I’ve recently released ReactiveNetwork library v. 0.10.0 for RxJava1.x and RxJava2.x. ReactiveNetwork is an Android library listening network connection state and Internet connectivity with RxJava Observables, which I’m developing for approximately 2 years now. In this version, I’ve done a few bug fixes and added new features for RxJava2.x version. Below, you can find the release notes: Release for RxJava1.x bumped RxJava1 version to 1.3.0 bumped test dependencies created Code of Conduct updated Kotlin version in sample apps added retrolambda to the sample Java app - issue #163 fixed behavior of network observing in disconnected state - issue #159 Release for RxJava2. ...

Release of prefser v. 2.1.0 with RxJava2 support

Jun 19, 2017
android, open-source, java, rxjava

I’ve recently released new version of prefser library for Android. In case you don’t know, it’s a wrapper for Android SharedPreferences with object serialization and RxJava Observables. This version has the new artifact, which has codebase migrated to RxJava2.x. As usual, I kept backward compatibility with RxJava1.x. You can find more details about the project at https://github.com/pwittchen/prefser. If you want to use it in your mobile project, you need the following dependencies in the build. ...

New reactive data types in RxJava2

May 31, 2017
java, rxjava

Introduction # I’m still exploring reactive programming world and RxJava library. Recently, I’ve migrated a few of my open-source libraries from RxJava1 to RxJava2 and written yet another project in RxJava2 from the beginning. Nevertheless, I’m still learning this library and its concept. It’s very wide topic. In RxJava1 we simply had one reactive data type called Observable. In RxJava2, we have more data types like Observable, Flowable, Single, Maybe & Completable. ...

Introducing YaaS Java SDK

May 28, 2017
java, rxjava

Introduction # In my company, there’s a concept of so-called “innovation day”. I have the possibility to “use” 1 innovation day per 2 development sprints. Last year, I used only 1 day due to the tight release schedule and a lot of work. Now, we are right after release, so I had time to take innovation day once again. I’ve decided to create YaaS Java SDK. If you don’t know what the YaaS is, check out my previous article about basic usage of YaaS proxy for the microservice. ...

Joining lists of RxJava Observables

May 15, 2017
java, rxjava

In RxJava we have a few operators for joining Observables. The most common are: concat merge zip Take a look at the documentation in these links. It has interactive marble diagrams showing how the operators work on the streams. You can move marbles along the lines and see how the output stream changes. It really helps to understand how it works. Code snippets in this article are based on RxJava 2. ...