Need estimation?
Leave your contacts and get clear and realistic estimations in the next 24 hours.
Table of contentS
Remember how your fitness app tracks your workouts and syncs seamlessly with your wearable device, providing real-time feedback and personalized coaching? Or think of how remote sensors at a manufacturing or storage facility transmit temperature and humidity data, helping automate the cooling system. This is the power of Bluetooth Low Energy (BLE) technology, which has become a game-changer for many day-to-day applications since its introduction in 2009.
No wonder decision-makers in small and mid-sized companies look to leverage technology for their business operations and customers. Are you one of such stakeholders? Then, understanding how to integrate BLE into your apps and systems is crucial.
We created this article in collaboration with Axon’s engineers to guide you through the essentials of BLE technology, its advantages, and a step-by-step approach to integrating BLE devices with mobile apps. Whether you are a business owner, product owner, or CTO, this comprehensive guide will help you harness BLE for your mobile applications.
Bluetooth Low Energy (BLE) is a wireless technology designed for short-range communication, designed for use cases that require minimal power consumption. It is a variation of the classic Bluetooth technology, optimized for low-energy applications: to only use power when absolutely necessary.
Most of the time, BLE devices are in a low-power sleep mode. They wake up and connect to a device in milliseconds to send a quick update, listen for a connection request, and transmit or receive small bits of data. After that, they go back to sleep mode. When a BLE device is not connected, it briefly “advertises” itself to other devices at specific setup intervals.
Also, BLE sends small amounts of data at a time (up to 20–27 bytes in a single message – less than a tweet!). Less data means less time transmitting and less energy used. Thus, it enables devices to communicate quickly and in small chunks while conserving battery life. This makes BLE ideal for wearables, smart home devices, and health monitoring systems.
Integrating BLE with mobile apps enables real-time data transfer between mobile (central) and peripheral devices, like wearables, sensors, beacons, etc., supporting a wide range of applications, from health and fitness to smart home automation and location tracking. Therefore, BLE presents a viable solution as businesses strive to meet consumer demands for convenience and connectivity.
Understanding the distinctions between BLE and classic Bluetooth is essential for making informed decisions about technology integration. Based on the technology overview by the Bluetooth SIG (Special Interest Group), the key differences include:
By integrating BLE devices with mobile apps, businesses open several important advantages at a time.
Better UX
First and the most noticeable advantage is an upgraded user experience. BLE allows for real-time updates and interactions in the app, creating a more engaging user experience. For instance, fitness apps provide immediate feedback during workouts, enhancing users' motivation.
Cost Savings
Secondly, BLE integration with your app makes your business operations and the use of connected devices for your customers more cost-effective. The low power consumption of BLE means that devices can operate longer on a single charge, reducing operational costs associated with battery replacements.
Simple Growth
Finally, BLE technology provides scalability opportunities. It is compatible with a wide range of devices, making it easy to scale applications as business needs evolve. This flexibility is crucial for companies looking to expand their product offerings.
BLE technology has found applications across various industries. The most common use cases include Health and Fitness (fitness trackers, smartwatches, and other wearables), Smart Home (smart locks, lighting systems, fire sensors, etc.), and Retail and Marketing (BLE beacons used for personalized offers and notifications to customers). Let’s look at them in more detail.
BLE made a revolution in healthcare and fitness, allowing smart, battery-powered devices to wirelessly send health data to your phone, doctor, or caregiver – and all while using hardly any energy. This simple technology enables wearable devices and medical sensors to send small pieces of health-related data to a mobile app or a monitoring system wirelessly, quickly, and securely.
A good and life-critical example is a glucose monitor. It is a small wearable device that measures vital health data (glucose level). It uses BLE to send that data to a smartphone app and inform the user of their glucose level changes in real-time. It can also store the data for tracking over time, send the data to a doctor or health platform, and even, if powered with AI or other advanced algorithms, provide diet or activity recommendations.
Other popular healthcare and fitness applications enabled with BLE include fitness trackers, smartwatches, heart rate monitors, blood pressure monitors, pulse oximeters, smart scales, and ECG devices. Some offer an entire product ecosystem, like Apple Watch in conjunction with the Apple Health app, which allows the integration of third-party BLE devices and tracking of the whole state of health within one app.
Tip from our product team: when developing BLE apps for healthcare, keep in mind the demographics of your target users. If it’s likely to include elderly people or people with special needs, make sure your application’s UI is as clear and straightforward as possible and all the needed accessibility features are in place.
BLE enables smart home and IoT devices to communicate wirelessly with smartphones, hubs, or each other using little power and to be installed without needing Wi-Fi or cables. It is most looked for in use cases where power-saving and simplicity are important, like small sensors, locks, tags, and switches.
Some well-known Smart Home BLE applications include Phillips Hue, Moen Flo Smart Water Detector and Shutoff, and Tile Trackers. Able to work even without internet connectivity, these devices can send or respond to signals from mobile apps, enabling remote lighting setup, sending alerts and notifications, distance estimation to tagged objects, etc.
Tip from our product team: to balance device’s battery life and the efficiency of device-to-app data exchange during BLE app development, make sure you implement periodic scans, notifications when data changes, and add auto-reconnect and retry logic to handle connectivity issues.
BLE is widely used in physical spaces like stores, malls, airports, museums, and warehouses to detect people’s location, help them navigate indoors, trigger personalized content, and collect location-based insights.
The core technology used here is the BLE Beacon. A BLE beacon is a small wireless device that sends out a unique ID at regular intervals. It doesn’t connect to users’ mobile phones, it just broadcasts a unique signal. Your phone app, in turn, listens for nearby beacons and, based on the received signal, provides the user with a notification (“Get 20% off this item!”), updates the user's location on a map, or logs analytics about customer traffic and behavior.
For example, the world-famous US department store chain Macy’s used BLE beacons with proximity triggers in their stores to detect when users were near departments and give them reward points or promotions. Or, the Louvre’s museum guide app uses BLE beacons near artworks and rooms to provide visitors with historical information and audio tours automatically when they approach exhibits. Interestingly, not just museum visitors but also researchers can benefit from such applications.
Tip from our product team: when interfacing with customers, especially in marketing, be mindful of users’ data security and privacy concerns. If you don’t want to scare them off, make sure your app asks for users location and Bluetooth permissions very clearly, explains how their data is going to be used, and doesn’t store or share any personal data without their consent.
As the demand for connected devices continues to rise, integrating BLE technology into mobile applications is no longer optional – it’s essential. Businesses that adopt BLE can stay ahead of the competition by offering modern and usable solutions that meet consumer expectations for connectivity and convenience.
Moreover, BLE technology opens new revenue streams through subscription models, in-app purchases, and partnerships with device manufacturers. By investing in BLE app development, companies can position themselves as leaders in their respective markets, attracting tech-savvy consumers and enhancing brand loyalty.
Several tools and libraries can streamline the BLE integration process, enhancing productivity and reducing development time:
When integrating BLE technology, it’s important to understand the differences between iOS and Android platforms. Each has its own set of guidelines and APIs that developers must follow.
For iOS, developers can utilize the Core Bluetooth framework, which provides classes for discovering, connecting, and interacting with BLE devices. The framework is designed to work seamlessly with Apple’s ecosystem, ensuring optimal performance.
Meanwhile, Android developers have access to the Android Bluetooth Low Energy API. This API allows for device discovery, connection, and data transfer, but it requires careful management of permissions and background processes to ensure smooth operation across various Android devices.
The Core Bluetooth framework is the primary API for BLE integration in iOS applications. Key components include:
For Android applications, developers can leverage the Android Bluetooth Low Energy API, which includes the following key components:
Integrating BLE technology into your app may seem daunting, but following a structured approach can simplify the process:
We will exemplify the BLE integration process by integrating Bluetooth Low Energy (BLE) into an Expo application using the react-native-ble-plx library for cross-platform development. With Expo and react-native-ble-plx, you can build cross-platform apps that interact with BLE peripherals, such as sensors and wearables. This guide covers setup, permissions, scanning, connecting, reading, writing, and best practices, with code examples and Expo-specific notes.
expo init MyBLEApp
cd MyBLEApp
npx expo install react-native-ble-plx
{
"expo": {
"plugins": ["react-native-ble-plx"]
}
}
For advanced configuration (background mode, custom permissions):
{
"expo": {
"plugins": [
[
"react-native-ble-plx",
{
"isBackgroundEnabled": true,
"modes": ["peripheral", "central"],
"bluetoothAlwaysPermission": "Allow $(PRODUCT_NAME) to connect to bluetooth devices"
}
]
]
}
}
BLE requires minimum SDK version 23. Expo handles this, but if you eject, set minSdkVersion in android/build.gradle:
defaultConfig {
minSdkVersion 23
}
BLE permissions are auto-injected by the plugin, but if you customize, ensure these are present:
<uses-permission android:name="android.permission.BLUETOOTH_SCAN" />
<uses-permission android:name="android.permission.BLUETOOTH_CONNECT" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-feature android:name="android.hardware.bluetooth_le" android:required="true"/>
No extra setup is needed for managed Expo apps. For bare workflow, ensure Bluetooth permissions are set in Info.plist.
BLE requires runtime permissions, especially on Android. Here’s a cross-platform permission handler:
import { Platform, PermissionsAndroid } from "react-native";
async function requestBluetoothPermission() {
if (Platform.OS === "ios") return true;
if (
Platform.OS === "android" &&
PermissionsAndroid.PERMISSIONS.ACCESS_FINE_LOCATION
) {
const apiLevel = parseInt(Platform.Version.toString(), 10);
if (apiLevel < 31) {
const granted = await PermissionsAndroid.request(
PermissionsAndroid.PERMISSIONS.ACCESS_FINE_LOCATION
);
return granted === PermissionsAndroid.RESULTS.GRANTED;
}
if (
PermissionsAndroid.PERMISSIONS.BLUETOOTH_SCAN &&
PermissionsAndroid.PERMISSIONS.BLUETOOTH_CONNECT
) {
const result = await PermissionsAndroid.requestMultiple([
PermissionsAndroid.PERMISSIONS.BLUETOOTH_SCAN,
PermissionsAndroid.PERMISSIONS.BLUETOOTH_CONNECT,
PermissionsAndroid.PERMISSIONS.ACCESS_FINE_LOCATION,
]);
return (
result["android.permission.BLUETOOTH_CONNECT"] ===
PermissionsAndroid.RESULTS.GRANTED &&
result["android.permission.BLUETOOTH_SCAN"] ===
PermissionsAndroid.RESULTS.GRANTED &&
result["android.permission.ACCESS_FINE_LOCATION"] ===
PermissionsAndroid.RESULTS.GRANTED
);
}
}
return false;
}
Create a singleton BLE manager instance to manage BLE operations:
import { BleManager } from "react-native-ble-plx";
export const manager = new BleManager();
Or as a singleton class:
import { BleManager } from "react-native-ble-plx";
class BLEServiceInstance {
manager: BleManager;
constructor() {
this.manager = new BleManager();
}
}
export const BLEService = new BLEServiceInstance();
Start scanning after permissions are granted and BLE is powered on:
function scanAndConnect() {
manager.startDeviceScan(null, null, (error, device) => {
if (error) {
// Handle error
return;
}
if (device.name === "MyDeviceName") {
manager.stopDeviceScan();
// Proceed with connection
}
});
}
Monitor BLE state and trigger scanning:
import React from "react";
React.useEffect(() => {
const subscription = manager.onStateChange((state) => {
if (state === "PoweredOn") {
scanAndConnect();
subscription.remove();
}
}, true);
return () => subscription.remove();
}, [manager]);
Connect and discover services/characteristics:
device
.connect()
.then((device) => device.discoverAllServicesAndCharacteristics())
.then((device) => {
// Ready to interact with device
})
.catch((error) => {
// Handle connection errors
});
Reading:
device
.readCharacteristicForService(serviceUUID, characteristicUUID)
.then((characteristic) => {
console.log("Read value:", characteristic.value);
})
.catch((error) => {
console.error("Read error:", error);
});
Writing:
device
.writeCharacteristicWithResponseForService(
serviceUUID,
characteristicUUID,
value
)
.then(() => {
console.log("Write success");
})
.catch((error) => {
console.error("Write error:", error);
});
Monitor device disconnection:
const setupOnDeviceDisconnected = (deviceIdToMonitor: string) => {
manager.onDeviceDisconnected(deviceIdToMonitor, (error, device) => {
if (error) {
console.error(error);
}
if (device) {
// Optionally reconnect
device.connect();
}
});
};
Enable verbose logging for debugging:
manager.setLogLevel("Verbose");
While integrating BLE technology can offer significant benefits, it also presents challenges that developers must address:
Since we demonstrated BLE device integration for cross-platform development using React Native, let’s also cover challenges that may arise with it.
Permissions and Platform Differences
if (Platform.OS === "android") {
const apiLevel = parseInt(Platform.Version.toString(), 10);
if (apiLevel < 31) {
await PermissionsAndroid.request(
PermissionsAndroid.PERMISSIONS.ACCESS_FINE_LOCATION
);
} else {
await PermissionsAndroid.requestMultiple([
PermissionsAndroid.PERMISSIONS.BLUETOOTH_SCAN,
PermissionsAndroid.PERMISSIONS.BLUETOOTH_CONNECT,
PermissionsAndroid.PERMISSIONS.ACCESS_FINE_LOCATION,
]);
}
}
Device Scanning and Connection
React.useEffect(() => {
const subscription = manager.onStateChange((state) => {
if (state === "PoweredOn") {
scanAndConnect();
subscription.remove();
}
}, true);
return () => subscription.remove();
}, [manager]);
Service/Characteristic Discovery
Disconnection Handling
bleManagerInstance.onDeviceDisconnected(deviceId, (error, device) => {
if (device) device.connect();
});
Android Manifest and Gradle
Debugging
Integrating BLE technology into mobile applications is a strategic move for businesses looking to provide better user experiences and innovative solutions. By understanding the fundamentals of BLE, its advantages, and the integration process, decision-makers can make informed choices that drive their companies forward.
As the demand for connected solutions continues to grow, embracing BLE technology can help organizations position themselves as leaders in their respective industries. With careful planning and execution, the integration of BLE can lead to increased customer loyalty, new revenue streams, and a competitive edge in the market.
Axon specializes in providing custom solutions to clients, blending modern technologies with a deep understanding of their business objectives. Having expertise in BLE integration and IoT application development, Axon can help your company become more competitive through optimizing internal operations or bringing game-changing ideas to life.
From initial consultation to deployment and beyond, Axon’s team of experts is dedicated to ensuring your BLE integration is smooth and meets our clients’ expectations. To achieve this level of delivery, we’ve been polishing our project delivery pipeline and forging internal best practices for over a decade now. To learn more about our development process, feel free to contact our business development experts and set up a free call with them.
Most modern smartphones, tablets, and wearables support BLE technology. This includes devices from major manufacturers like Apple, Samsung, and Google.
Yes, BLE incorporates security features such as encryption and authentication to protect data during transmission. However, developers must implement best practices to ensure the security of their applications.
Absolutely! BLE is widely used in Internet of Things (IoT) applications, enabling seamless communication between devices and mobile apps.
Free product discovery workshop to clarify your software idea, define requirements, and outline the scope of work. Request for free now.
[1]
[2]
Leave your contacts and get clear and realistic estimations in the next 24 hours.