Bluetooth

React Native 7 min min read Updated: Aug 03, 2026 Advanced
Bluetooth
Advanced Topic 10 of 18

Bluetooth

Bluetooth integration allows React Native applications to communicate with nearby devices, such as wearables, printers, or IoT hardware, using Bluetooth Low Energy (BLE) or Classic Bluetooth protocols.

Installing a Bluetooth Library

bash npm install react-native-ble-plx

Requesting Bluetooth Permissions

Modern Android versions require explicit runtime permissions for Bluetooth scanning and connection, in addition to location permissions in some cases.

javascript await PermissionsAndroid.request(PermissionsAndroid.PERMISSIONS.BLUETOOTH_SCAN);

Scanning for Nearby Devices

javascript import { BleManager } from 'react-native-ble-plx'; const manager = new BleManager(); manager.startDeviceScan(null, null, (error, device) => { if (device) { console.log('Found device:', device.name); } });

Connecting to a Device

javascript const connectedDevice = await manager.connectToDevice(deviceId); await connectedDevice.discoverAllServicesAndCharacteristics();

Reading and Writing Data

javascript const characteristic = await connectedDevice.readCharacteristicForService( serviceUUID, characteristicUUID );

Handling Disconnections

Bluetooth connections can drop unexpectedly, so applications should listen for disconnection events and implement reconnection logic where appropriate.

Common Use Cases

  • Connecting to fitness trackers and smartwatches
  • Communicating with Bluetooth printers
  • Controlling IoT devices like smart locks or lights

Conclusion

Bluetooth integration using libraries like react-native-ble-plx enables React Native applications to communicate with a wide range of nearby hardware devices, unlocking powerful IoT and wearable integrations.

Get Newsletter

Subscibe to our newsletter and we will notify you about the newest updates on Edugators