July 28, 2020 | 4min read
The Evolution of Our Open-Source Libraries
A long time ago, in the Galaxy (not) far, far away…
Polidea works on several Android projects that involve Bluetooth connectivity.
The then-CEO, Jakub Lipiński, makes a decision that will shape the future of Polidea.
He asks Staff Software Engineer, Dariusz Seweryn, to translate that knowledge into an OPEN-SOURCE LIBRARY, available on GitHub.
RxAndroidBle was born. As the number of repositories grows, it’s time to make them shine. As brightly as their GitHub stars!
With this opening crawl, you know how it all started. The aim of the first library was to fast-track the implementation of Bluetooth connectivity with ready-to-use resources. Developers would also have fewer issues as the code was already applied in projects.
Giving back to the community became the backbone of Polidea—you can learn all about our journey to #CodeLeadership. With more projects involving Bluetooth Low Energy, we continued our mission to share our knowledge. You can also discover the benefits of open-source for your business in one of our previous articles.
Our pride and joy—RxAndroidBle—has 2.7K stars with over 800 commits. It enables data transmission between Android devices without imposing the way of interpreting it. The library is based on a tried-and-tested code implemented against many peripherals (BLE devices) across several projects. In other words, it’s stable, which means that the number of issues decreases significantly compared to starting from scratch.
The second in command is RxBluetoothKit. After the Android version came the iOS one, however, with a different approach. The open-source library not so much lessens the pain points as it changes the API. It’s because the Bluetooth connection works just fine on iOS. What the new API does is increase the ease-of-use of the iOS Bluetooth functionalities.
In 2016, no libraries were enabling the Bluetooth connection between a peripheral device and an application developed using a cross-platform framework. That’s where Polidea came in and developed the library building on the previous Android and iOS experience. That’s how React-native-Ble-plx was born.
Nordic Semiconductor SoCs (System on a chip) are one of the most used in the industry—a chip with a processor and a Bluetooth Low Energy radio. Development for their products is made mostly in C or C++ languages. There is no industry-wide standard for compilation toolchain of C/C++, but it can be done using CMake, an open-source tool for managing the software building process. With it, the set-up and maintenance of complex environments are much more convenient for developers. One of the most popular series of SoCs is the nRF5 family.
Knowing all that, our open-source library’s goal is to create the ultimate nRF5 CMake solution—most complete, flexible, and reliable. The library currently supports all nRF52 models and configurations and features continuous integration and script generation.
nRF5 CMake is a big project. Our goal is to cover around 300 standalone libraries and 200 examples present in Nordic Semiconductor’s Software Development Kits. If you are interested in that library, check out the in-depth article on the technical and business aspects of cmake-nRF5x.
Cockpit is a helpful tool—a debug menu—for Android developers, testers, and designers providing a way to define a set of params that can be used in the application and changed anytime without having to recompile the project. It also provides a compact built-in UI so using the library is as simple as possible.
If you have a condition that needs to be met to present some functionality, such as pop-up information, with Cockpit, you can work on that pop-up without the need to each time satisfy the requirement. It also enables developers to quickly review how a work-in-progress code presents itself on an Android device. And doing so outside of the chronological order of events in the app.
The open-source library is useful for testers as well. For instance, a user can see the welcome pop-up only once, which would mean that a tester needs to reinstall the app with each test. With Cockpit, you can reset the condition that was already met—using the app for the first time—and quickly test it multiple times.
If you are a client that is not sure about the color scheme of your application, each change entails time-consuming code rewrite and recompilation. However, with Cockpit, you can test visual components with a simple color picker. That is just one example. With Cockpit, you can also add custom actions—generate data, reset specific states. It speeds-up the decision-making process.
Those are not the only open-source libraries we’ve got. If you are interested in running your BLE related Flutter code on a virtual device, we recommend reading our article on BLEmulator.
If there is any question you have about our libraries or want to contribute to our projects, don’t hesitate to contact us!
Senior Software Engineer
Lead Software Engineer
Staff Software Engineer
You might also like
December 29, 2020
Open-source Software—What Is the Future of Development?
We sat down with Head of Cloud & Open Source services Karolina Rosół and Jarek Potiuk Principal Software Engineer at Polidea to talk about the future of open-source software. Dig in!