Language

Bluetooth Development: Callback vs Reactive Programming

Building Bluetooth Low Energy applications involves handling numerous asynchronous operations: scanning, connecting, discovering services, reading/writing characteristics, and handling disconnections. The traditional callback-based approach can quickly become unwieldy, leading to what developers call “callback hell.” In this post, we’ll compare the callback approach with reactive programming using RxSwift and RxJava, and explore how reactive patterns can dramatically improve your BLE code.

Read More

Securing Bluetooth Communication: Implementing Authentication and Encryption Flows

Bluetooth has become the invisible thread connecting our devices, from smartwatches and health trackers to smart locks and industrial IoT systems. But with convenience comes risk: Bluetooth communication is wireless and easily intercepted, making it vulnerable to eavesdropping, unauthorized access, and replay attacks.
To defend against these threats, authentication and encryption are essential. In this post, I’ll introduce a robust Bluetooth security flow, explaining how authentication, key exchange, and encrypted transfer work together. We’ll also compare it to TLS/https since both share similar approach of layered security.

Read More

iOS 18: What's news in CoreBluetooth?

AccessorySetupKit, introduced in iOS 18, revolutionizes how third-party Bluetooth and Wi-Fi accessories integrate with iOS devices. This framework delivers a seamless setup experience, enhancing convenience for users and expanding capabilities for developers.
While AccessorySetupKit supports discovery for Bluetooth, Wi-Fi, and Local Network devices, this post will focus specifically on BLE (Bluetooth Low Energy). The setup process for Wi-Fi and Local Network devices follows a similar approach.

Read More

Bluetooth security: Pairing and Bonding

In modern times, Bluetooth plays a crucial role in connecting devices seamlessly. From fitness trackers to smart home devices, Bluetooth Low Energy (BLE) allows devices to communicate efficiently while reducing power consumption. However, with the rise of wireless communication, ensuring security has become a key concern. Two core concepts of Bluetooth security are Pairing and Bonding, which are often misunderstood in the context of BLE.

Read More

Android Bluetooth: A Pitfall

Developing BLE-enabled Android apps is fraught with challenges, especially when it comes to managing concurrent operations. One of the most common pitfalls developers face is the unexpected behavior that occurs when trying to execute BLE operations in rapid succession. In this blog post, we’ll delve into why this happens and how you can overcome it by implementing a custom queuing mechanism for BLE operations.

Read More

Best practice: iOS vs Android Bluetooth

Bluetooth technology has become an integral part of modern mobile applications, enabling seamless wireless communication between devices. Whether it’s for connecting to a wireless headset, transferring files, or interacting with smart home devices, Bluetooth plays a crucial role in enhancing user experience.

For mobile developers, understanding how to implement Bluetooth functionality is essential. In this post, we’ll dive into a detailed comparison of the Bluetooth development frameworks for iOS and Android.

Read More

Core Bluetooth on WatchOS


Ever thought about adding a Watch App to your product? Wondering how to make CoreBluetooth work on your Watch App? You’re in the right place! This tutorial is your go-to guide. In this post, we’ll take you step by step through the process of smoothly bringing in data from Bluetooth gadgets into your Apple Watch apps.

Read More

Protobuf In Practice

I have worked on Bluetooth products, including wearable devices and smart locks, in many years. Facilitating the transfer of messages between system components is a crucial aspect due to differences in programming languages, the necessity for consistency, and limitations on data transfer size. To address these challenges, we utilize Protocol Buffers.
Protocol Buffers, also known as Protobuf, is a free and open-source cross-platform data format used to serialize structured data developed by Google. It is designed to be efficient, extensible, and user-friendly. In this tutorial, we will cover the basics of creating a simple Protocol Buffers message, defining a schema, and generating code in various programming languages.

Read More

What's new of Appclip on iOS 17?

With the introduction of iOS 17, applications now have the ability to launch App Clips from other apps using the App Clip’s invocation URL. This functionality opens up various possibilities. For instance, if you’ve developed a suite of apps, you can enable them to launch App Clips from one another, providing users with access to specific functionalities without the need for a full app installation.

Read More

Schedule task in background from foreground service

If you’re running your service on Android, be aware that Android has introduced stricter background execution restrictions in recent versions. Starting from Android 8.0 (API level 26) and above, background services have limitations on their execution time, especially when the app is in the background. Make sure you are aware of these restrictions and adapt your service accordingly.

Read More