Skip to main content

BluetoothLE

This plugin has the most complete implementation for interacting with Bluetooth LE devices on Android, iOS and partially Windows. It's a wrap around randdusing/cordova-plugin-bluetoothle cordova plugin for Ionic. It supports peripheral and central modes and covers most of the API methods available on Android and iOS.

https://github.com/randdusing/cordova-plugin-bluetoothle

Stuck on a Cordova issue?

Don't waste precious time on plugin issues.

If you're building a serious project, you can't afford to spend hours troubleshooting. Ionic’s experts offer premium advisory services for both community plugins and premier plugins.

Installation#

$ npm install cordova-plugin-bluetoothle
$ npm install @ionic-native/bluetooth-le
$ ionic cap sync

Supported Platforms#

  • Android
  • iOS

Usage#

React#

Learn more about using Ionic Native components in React

Angular#

import { BluetoothLE } from '@ionic-native/bluetooth-le/ngx';
constructor(public bluetoothle: BluetoothLE, public plt: Platform) {
this.plt.ready().then((readySource) => {
console.log('Platform ready from', readySource);
this.bluetoothle.initialize().then(ble => {
console.log('ble', ble.status) // logs 'enabled'
});
});
}