Cordova BLE plugin updated – Bluetooth Low Energy apps in JavaScript

Mikael KindborgBlogs

Tweet about this on TwitterShare on FacebookShare on LinkedInShare on Google+

The Evothings Cordova BLE plugin has been updated with new features and bug fixes. Read on to learn what is new and how to use the plugin in your Cordova mobile applications.

What is new in the BLE plugin

New in the Cordova BLE plugin is:

  • Support for background scanning on iOS and Android – develop mobile apps that scan for BLE devices and Eddystone beacons when the app is in the background.
  • Scanning for an explicit Service UUID is now supported, which makes scanning more efficient and is required for background scanning on iOS.
  • The way characteristic notifications are turned on/off has been simplified on Android – behaviour is now the same on both Android and iOS.

Read the release notes for further details.

Get the BLE plugin from GitHub or npm.

What you can do with the plugin

The BLE plugin allows you to develop mobile apps in HTML/JavaScript and build native apps for publication on the iOS and Android app stores using the Apache Cordova build system.

Example of things you can do with the plugin:

  • Scan for nearby BLE devices
  • Get estimated distance to BLE devices using the RSSI and txPower values
  • Scan for Eddystone compatible beacons
  • Connect to BLE devices from your app and read and write data on the device
  • Connect to multiple devices

mbed-nordic-nrf51-dkThere are numerous applications for BLE, for instance:

  • Industrial applications, e.g. tracking, sensors, and control systems.
  • Health and fitness applications, e.g. heartbeat/pulse, exercise apps, anti-stress apps, etc.
  • DIY and Maker applications – Mobile apps written in HTML/JavaScript are perfect for developing apps for microcontrollers like ARM mbed boards and Arduino, RedBear Lab, and many others.
  • rad_beaconsBeacons – Write apps that scan for beacons and display related information. Beacons are perfect for context-aware applications, displaying information and tracking physical objects.

Support for Web Bluetooth

The BLE plugin supports the Web Bluetooth API using a library written on top of the plugin. Find out more about Evothings Studio and support forWeb Bluetooth and also for ECMAScript 6.

Develop BLE apps with a fast workflow

We are working on a new version of the Evothings Viewer app that will include the new BLE plugin. Evothings Viewer is the companion app for Evothings Studio.

Using Evothings Viewer and Evothings Workbench you can develop mobile apps for Bluetooth Low Energy with a really fast workflow. It just takes seconds to reload your app on connected mobile phones and instantly try it out – with real BLE devices.

Then build your app with Cordova and it is ready to be submitted to the app stores!

How to get started

Here are links to documentation pages and tutorials that help you to get started:

Download Evothings Studio – be up and running with mobile apps for BLE in just 5 minutes

Follow these steps to get started quickly with running a mobile BLE application:

  1. Download Evothings Studio
  2. Unpack the download package and run Evothings Workbench
  3. Install the Evothings Viewer app on your Android or iOS mobile phone or tablet (get it from the app stores)
  4. Connect to the Workbench from the Viewer (follow on-screen instructions in the Workbench)
  5. Run the example app “BLE Scan”
  6. Enjoy searching for nearby BLE devices!