cordova-plugin-ble-central
Advanced tools
Comparing version 1.2.3 to 1.2.4
@@ -0,1 +1,9 @@ | ||
= 1.2.4 = | ||
Add sequence numbers to notifications on Android to handle out of order notifications. Android #625 #656 Thanks timburke | ||
Location services is now a warning on Android. Add isLocationEnabled() #607 #633 Thanks doug-a-brunner | ||
Use printf of cordova for LOG, reuse pattern, improve loop #647 Thanks ChristianLutz | ||
Add queueCleanup method to API #695 Thanks untilbit | ||
Fix null pointer in onLeScan #500 Thanks fjms | ||
Remove cordova-plugin-compat #705 #617 | ||
= 1.2.3 = | ||
@@ -2,0 +10,0 @@ Fix iOS crash when advertising data contains kCBAdvDataLeBluetoothDeviceAddress #685 #697 Thanks jospete |
{ | ||
"name": "cordova-plugin-ble-central", | ||
"version": "1.2.3", | ||
"version": "1.2.4", | ||
"description": "Bluetooth Low Energy (BLE) Central Plugin", | ||
@@ -5,0 +5,0 @@ "cordova": { |
@@ -78,2 +78,3 @@ # Bluetooth Low Energy (BLE) Central Plugin for Apache Cordova | ||
- [ble.isEnabled](#isenabled) | ||
- [ble.isLocationEnabled](#islocationenabled) | ||
- [ble.isConnected](#isconnected) | ||
@@ -555,2 +556,33 @@ - [ble.startStateNotifications](#startstatenotifications) | ||
## isLocationEnabled | ||
Reports if location services are enabled. | ||
ble.isLocationEnabled(success, failure); | ||
### Description | ||
Function `isLocationEnabled` calls the success callback when location services are enabled and the failure callback when location services are *not* enabled. On some devices, location services must be enabled in order to scan for peripherals. | ||
### Supported Platforms | ||
* Android | ||
### Parameters | ||
- __success__: Success callback function, invoked when location services are enabled. | ||
- __failure__: Error callback function, invoked when location services are disabled. | ||
### Quick Example | ||
ble.isEnabled( | ||
function() { | ||
console.log("location services are enabled"); | ||
}, | ||
function() { | ||
console.log("location services are *not* enabled"); | ||
} | ||
); | ||
## startStateNotifications | ||
@@ -557,0 +589,0 @@ |
@@ -149,2 +149,6 @@ // (c) 2014-2016 Don Coleman | ||
queueCleanup: function (device_id, success, failure) { | ||
cordova.exec(success, failure, 'BLE', 'queueCleanup', [device_id]); | ||
}, | ||
requestMtu: function (device_id, mtu, success, failure) { | ||
@@ -212,2 +216,7 @@ cordova.exec(success, failure, 'BLE', 'requestMtu', [device_id, mtu]); | ||
// Android only | ||
isLocationEnabled: function (success, failure) { | ||
cordova.exec(success, failure, 'BLE', 'isLocationEnabled', []); | ||
}, | ||
enable: function (success, failure) { | ||
@@ -251,2 +260,8 @@ cordova.exec(success, failure, "BLE", "enable", []); | ||
queueCleanup: function(device_id) { | ||
return new Promise(function(resolve, reject) { | ||
module.exports.queueCleanup(device_id, resolve, reject); | ||
}); | ||
}, | ||
read: function(device_id, service_uuid, characteristic_uuid) { | ||
@@ -253,0 +268,0 @@ return new Promise(function(resolve, reject) { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
307273
76
2049
990