ReactiveBeacons - release of v. 0.6.0 with support for RxJava2

Thanks to @BugsBunnyBR I released new version of ReactiveBeacons library with the RxJava2.x support. It’s an Android library scanning BLE (Bluetooth Low Energy) beacons nearby with RxJava Observables. I also kept backward compatibility with RxJava1.x. Different versions of the libraries are located on the separate git branches. It’s a similar approach to original RxJava project. I have separate builds on Travis CI, separate artifacts and JavaDocs. Such approach generates more overhead, but in such case, RxJava1.x can be kept in a maintenance mode and RxJava2.x can be a subject of the future development. What has been done in this version? ...

April 3, 2017 · 2 min · 244 words · Piotr Wittchen

Handling different Android versions with strategy pattern

When we’re developing Android apps, we have to remember that different users have different versions of the Android OS. Unfortunately, not all of them has the newest version of the system and some of them have older devices with older systems. Some of these devices may be even unsupported because e.g. Google supports their devices like Nexus and Pixel for only 2 years. When we want to reach as many users as possible and make the app available for almost everyone, we have to handle different Android versions. One of the solutions for that problem is strategy design pattern (it’s also called Policy in Domain-Driven Design). I’m developing an Android open-source library called ReactiveNetwork, which is used for monitoring connectivity with the network in the system. Network monitoring strategies vary between different versions of Android and I wanted to choose an appropriate strategy for appropriate Android version. To do so, I’ve created NetworkObservingStrategy interface: ...

March 26, 2017 · 2 min · 273 words · Piotr Wittchen

Android design inspirations

When we are planning to create our next Android app, besides the codebase, it’s also good to plan its design, UI, and UX. Before doing that, we can take a look at some inspirations and work of other people to gather a few UI design patterns, inspirations, and ideas. Good resource of such inspirations is Android Niceties website. As the authors write, this website is a collection of screenshots encompassing some of the most beautiful looking Android apps. You can also take a look at [https://pl.pinterest.com/explore/android-ui/](http://android-ui tag on Pinterest). Do you know any other similar resources? Share them in comments :-). ...

March 19, 2017 · 1 min · 101 words · Piotr Wittchen

Unit test coverage report with Travis CI for Robolectric on Android

Introduction Some time ago, I’ve written an article about Test coverage report for Android application. It got some interest (many comments below article and many visits according to Google Analytics), so I decided to refresh this topic. Previously, I’ve written instrumentation unit tests, which needed to be executed on a real device or an emulator. It’s a good approach when you want to test functionalities strongly connected with the device. E.g. when you want to test operations on a real SQLite database or something like that. Nevertheless, this approach has huge disadvantages. It’s hard to run tests on the Continous Integration server because we need to have the emulator or device up & connected all the time and also tests need to interact properly with the device to get passed what is not so easy. In most cases, mocking part of the application’s behavior is enough. In that case, we can easily run tests on a CI server and have deterministic test results. In order to do that, we can use Robolectric. ...

March 19, 2017 · 3 min · 599 words · Piotr Wittchen

ReactiveNetwork - release of v. 0.2.0

I’ve recently released new version of ReactiveNetwork library for Android. Here are the fresh release notes for version 0.2.0: added possibility to observe WiFi signal level with observeWifiSignalLevel(context, numLevels) and observeWifiSignalLevel(context) method created WifiSignalLevel enum added internet check to parameters of getConnectivityStatus(context, checkInternet) method made getConnectivityStatus(context, checkInternet) method public changed String variable status in ConnectivityStatus enum to description and made it public changed output of the toString() method in ConnectivityStatus to keep consistency with another enum made ReactiveNetwork class non-final bumped Kotlin version in sample app to 1.0.0-rc-1036 increased immutability of code of the library updated sample apps and documentation Thanks to @llp and his Pull Request, we are able to observe WiFi signal level AKA RSSI now! ...

February 11, 2016 · 2 min · 237 words · Piotr Wittchen