Introducing ReactiveBus

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:...

March 11, 2018 · 2 min · 259 words · Piotr Wittchen

DroidCon Poland 2017 - Is your app really connected?

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....

December 2, 2017 · 1 min · 103 words · Piotr Wittchen

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

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....

November 9, 2017 · 3 min · 556 words · Piotr Wittchen

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

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....

October 5, 2017 · 3 min · 441 words · Piotr Wittchen

Introducing ReactiveAirplaneMode

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.toString()))); In the code above subscriber will be notified only when airplane mode changes....

August 15, 2017 · 1 min · 198 words · Piotr Wittchen