This plugin implements BLE support for Android, iOS and Windows 8.1 (partial support). Enable your Cordova and PhoneGap mobile applications to communicate with all sorts of BLE devices.
Available functionality:
- Scan for BLE devices (background scanning supported on iOS and Android)
- Establish connections
- List services, characteristics and descriptors
- Read and write the values of characteristics and descriptors
- Request notification of changes to the values of characteristics
- Poll RSSI (signal strength) of a device (Android and iOS only)
- Experimental support for Peripheral mode on Android
Install using the Apache Cordova command line:
cordova plugin add cordova-plugin-ble
Reference documentation is available in the ble.js source file.
To build the documentation using jsdoc, run this command:
jsdoc -l -c conf.json ble.js
Generated documentation is available at the Evothings documentation web site.
The file introduction.md contains a general introduction to BLE programming.
The plugin API is rather low-level and we recommend using the EasyBLE high-level library, which is built on top of the BLE plugin.
This library is now available as a single file: easyble.dist.js
To use the library, just include the file in index.html:
<script src="easyble.dist.js"></script>
List of libraries built on top of the BLE plugin:
- EasyBLE - BLE library (see BLE example apps that ship with Evothings Studio for code examples) (code, documentation, tutorial)
- Eddystone - library and Cordova plugin for scanning for Eddystone devices/beacons (Physical Web) (Cordova Plugin, code, documentation, tutorial)
- Bleat - library with support for Web Bluetooth (code, master repository, tutorial)
Read the BLE app development tutorial to get started with your BLE mobile application.
This plugin is used in Evothings Studio, and is compatible with Apache Cordova and PhoneGap.
Evothings Studio is a development and prototyping tool for making Cordova/PhoneGap apps. With Evothings Studio the edit/run turn-around cycle is just a second or two, which is much faster compared to the traditional method of rebuilding the Cordova project for each update.
See Evothings Examples for comprehensive examples of mobile apps that communicate over Bluetooth Low Energy, and which you can use for your own projects to get quickly up and running.
Download Evothings Studio - it is fun and easy to get started. It is open source!